« MBS Xojo Plugins, ver… | Home | FileMaker Stammtische… »

Move from REALSQLdatabase to SQLiteDatabase

While current SQLiteDatabase in Xojo 2018r4 uses SQLite 3.25.3, the old REALSQLdatabase is still version, about 6 years older. If you still have code with REALSQLdatabase, please move it to SQLiteDatabase. Or you move to SQLDatabaseMBS, which offers SQLite 3.27.1 currently with the recently added VACUUM INTO command.

Normally you just change the class names from REALSQLdatabase to SQLiteDatabase and RealSQLPreparedStatement to SQLitePreparedStatement. The older class sometimes added ROWID to the select statements to make edit/update/delete methods workable.

A few things SQLiteDatabase got over the six years:
  • SQLite got a backup API, so you can backup to a new SQLiteDatabase.
  • SQLite 3.25.0 got window functions
  • SQLite 3.24.0 got support for PostgreSQL-style UPSERT.
  • SQLite 3.18.0 got PRAGMA optimize command.
  • SQLite 3.15.0 got support for row values.
  • SQLite 3.9.0 got FTS 5 extension
  • Endless bug fixes including some that could corrupt the database.
  • Great performance improvements between
Finally a general tip. Please call SQLExecute "PRAGMA cache_size = 20000" early in app start to set a big enough cache size. If the tables or their indexes don't fit in memory, performance suffers.
12 02 19 - 08:28