Home > database >  Sqlite database insert data, how can't see the data? But can check the data, why? Data in the b
Sqlite database insert data, how can't see the data? But can check the data, why? Data in the b

Time:11-14

Sqlite database insert data, how can't see the data? But can check the data, why? Data in the buffer?

I was dragged sqlite database to sqlite Developer to check the data!!!!!!

CodePudding user response:

Sqlite3_db_cacheflush - don't know what to do use this function, don't want to use this function in a timely manner brush into the sqlite database data to disk?

CodePudding user response:

Frequently updated sqlite3 database leads to the problem of database is locked!
- https://bbs.csdn.net/topics/290071244

CodePudding user response:

Sqlite3_db_cacheflush
- https://blog.csdn.net/LostSpeed/article/details/83108214

 
Preface
Calls in the demo sqlite3_db_cacheflush, make sqlite3 database is not closed, the flush of data to disk, so, I can copy the database files online,

Found in the development environment, the API is usable,
In the experimental environment, carry out the API collapse,

Contrast the sqlite environment:

Development environment with sqlite3 and libsqlite3 - dev
Experimental environment because they don't need to develop the head, only with sqlite3
Finally in the experimental environment down off sqlite3_db_cacheflush calls, demo that,

Sqlite3_db_cacheflush this operation, will be forced to write disks, reduces the efficiency, but also should not call, only need to use another database connection and open the database, also know the current progress, to ensure that the data is synchronized by the sqlite3 database itself,

Sqlite3_exec with buffer action, if the insert statement, more than the buffer size, will be written to disk, as fwrite,


  • Related