Converting from sqlite to sqlite3
(1) By Philippe Heroux (pheroux) on 2021-08-13 19:42:37 [link]
Hi, I'm converting a piece of code from sqlite to sqlite3. I have a few questions: 1) When creating a db you use to be able to pass a setup string. Is this no longer a thing in sqlite3?: For example, sql::db database (db_file, setup_str); 2) What happened to transactions? I use to have to call begin_transaction(). For example, auto transaction (database.begin_transaction()); transaction.commit(); Thanks, -Phil
(2) By Richard Hipp (drh) on 2021-08-13 19:57:53 in reply to 1
There are not sqlite APIs. I think you must be using a third-party wrapper.
(3) By Simon Slavin (slavin) on 2021-08-14 21:05:43 in reply to 1 [link]
As DRH wrote, you're using an API that has nothing to do with SQLite. I think you're using SQL Server API calls. You could not pass a setup string when you opened a SQLite1 database. And SQLite doesn't have API calls for transactions, you just use normal calls and pass them things like "BEGIN" and "COMMIT". So we can't tell if you mean you're converting SQL Server API calls to SQLite calls, or something else. Perhaps delete this thread and make another which tells us what you're doing more precisely.