Lazarus
Programming => Operating Systems => Android => Topic started by: las on April 05, 2019, 11:27:34 am
-
Hi!
Why sqliteDataAccess don't have procedures for using execSql with transactions? It's not possible?
-
But it have [transparent to the LAMW users...]!
you can look for "jSqliteDataAccess.java" source code
[LAMW folder "......\android_wizard\smartdesigner\java"]
-
Yes, I know that sqlite supports transactions. However, this is not possible when working with him in LAMW. I think it makes sense. It is also bad that block processing of requests goes in different transactions. It would be advisable to conduct them in a single transaction. It would be faster to maintain data integrity. Also, it would be good to update the database in one transaction. Otherwise, in the event of a failure in one request, the entire database will be in an incomprehensible state. And further. I have not found anywhere documenting the database updating tool. I only saw this in the source code on java. When does this update start?
-
Yes, I know that sqlite supports transactions. However, this is not possible when working with him in LAMW.
"under-the-hat" LAMW call "jSqliteDataAccess.java" code that have "transactions" support....
-
How to execute two requests in one transaction?
-
Yes, I know that sqlite supports transactions. However, this is not possible when working with him in LAMW.
"under-the-hat" LAMW call "jSqliteDataAccess.java" code that have "transactions" support....
It would be very convenient if all UpdateTableBatch requests were executed in a single transaction. The integrity of the database would be respected (all requests were executed or all canceled) and would work much faster.
The implementation of sqlite in lazarus for Windows supports the ability to manage transactions in a user program. I open a transaction, execute several requests, and then either close or cancel. Why didn't they make the same implementation in LAMW?
-
It would be very convenient if all UpdateTableBatch requests were executed in a single transaction.....
Done!
Added build-in transaction and boolean result to "InsertIntoTableBatch" method
Added build-in transaction and boolean result to "UpdateTableBatch" method
and
Added "ExecSQLBatchAsync" [build-in transaction] method [can be used to "Insert" or "Update" ... etc...]
Added event "OnAsyncPostExecute" to notify Async task result....
Added SetBatchAsyncTaskType to remind ExecSQLBatchAsync state....
Please, test it!