-
Hi @simolus3 ,
In our application we are creating database instance using GetIt. While calling this insertBulkData method, I'm passing that database instance to this method.
If I hide that batchInsert and check then UI is not getting freezed. But If i run with batchInsert then UI is getting freezed. Can you help me to fix this issue, what I'm missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
There are two sources for UI freezes to be aware of when using drift: Creating the SQL statements from the Dart API and actually executing that SQL. For most queries, executing the SQL on a background isolate is enough. But for 50k inserts, just the cost of creating the SQL statements alone might cause short UI freezes.
I assume the UI freezes happen because you're not executing SQL on a background isolate. Could you try replacing the
Uh, couldn't the method just use |
Beta Was this translation helpful? Give feedback.
-
Hi @simolus3, We tried to attach database using below attach query. We are running the below query in our main encrypted database class file. It is not throwing any error.
But it is not attaching the database. I have confirmed this by running the below statment
Do you know any other way to combine two encrypted database to write join query? |
Beta Was this translation helpful? Give feedback.
Wouldn't you have to supply a key to
ATTACH
?