fmdb icon indicating copy to clipboard operation
fmdb copied to clipboard

README gives incorrect info on pragma and vacuum

Open blahah opened this issue 13 years ago • 1 comments

The README file states that pragma and vacuum queries are update statements, but in fact they are queries. Contrary to what the README says, one must use executeQuery with pragma and vacuum. Failure to do so throws an sqlite error.

blahah avatar Jul 02 '12 22:07 blahah

In my tests, vacuum works fine with executeUpdate. Pragmas seem to depend on the specific arguments. For instance, this will work with executeUpdate: PRAGMA page_size=2048

However, this will not: PRAGMA journal_mode=delete

because it returns what the previous journal_mode was.

What version of sqlite are you using? And what pragmas?

ccgus avatar Jul 04 '12 16:07 ccgus