Small. Fast. Reliable.
Choose any three.

Page History

Turn Off History

FAQ

Q) Is the built-in SQL function list under http://www.sqlite.org/lang_expr.html complete? What about String functions like REPLACE?


Q) Is there a Wiki engine that uses SQLite instead of, for example, MySQL?
A) This wiki uses SQLite. See http://www.cvstrac.org/

A) PhpWiki supports SQLite via PEAR::DB


Q) What is the calling convention for sqlite3.dll API functions (for Windows) and for SQLite callback functions (for sqlite3_exec function)?
A) cdecl (caller pushes parameters right to left on stack, caller cleans up)
Q) On sqlite3_Open(), when the file with given filename doesn't exists, SQLite creates new database. But usually, the application needs to do some initialization work to be able to use this new database (create tables etc.) So, what is the most natural way to determine, that Open() created new database instead of opening the existing one?
A) Use some system API funtion like IsFileExists(DB_filename) before calling sqlite_open(DB_filename)
A) or, use the "user_version" pragma. Right after calling open(), do "pragma user_version". If it returns "0", then assume that this is a new file -- create your tables and do "pragma user_version=1" to mark that you've created your tables in this db. The next time you do "pragma user_version", it will return 1, signifying that you've previously set up this db.
Q) Is it possible to let the programmer choose - commit or rollback the transaction that was begun with BEGIN and some INSERTS/UPDATES, but was not finished due to system hangup or power failure, instead of automatically rollback it on opening the DB??? (assume the transaction journal file integrity is fully correct)
Q) Is there a standard way of backing up SQlite databases aside from simply copying the database file to another location

A) Yes. In the command line tool, the ".dump" command will output the schema and data in the form of sql statements. E.g.:

        sqlite3  mydatabase  .dump  >Mybackup.sql

You can pipe this file back into sqlite3 should you need to restore.


Q) Is it possible to output queries and associated results into an output text file?
Q) Is there a simple way to figure out the primary key(s) of a table through sql?
Q) Does SQLite have a bulk loading tool?
Q) How can I use SQLite in combination with Qt from Trolltech ?
Q) Where do I get the header file (i.e. sqlite3.h) matching the precompiled binary (i.e. sqlite-3.2.1.so.gz) ?
Q) Are there any advantages of using either a static library over the linked library (Performace, Speed, Compatibality)?
Q) Why do the prototypes from the C api reference and the Quick Start guide not match up?
Q) I am setting up a site on Powweb , they have MySQL for me to use but wanted to know if I can install this DB and Wiki in a sub folder to run by itself?
Q) Could SQLite be used to implement the Table Oriented Programming philosophy efficiently and easily? Can an embedded database using precompiled access functions compete with object-oriented access of object attributes in performance (a slowdown by a factor of 10 could be tolerated, but not by a factor of 100 or 1000)? If not, could this be achieved (by some caching mechanism, for example)?
Q) Would it be possible to run SQLite off a DVD essentially creating a completely self contained system without requiring any installation or modification on the host computer, and would it be prohibitively slow to access the DB to doing so?
Q) What conventions should I follow when submitting a patch and where should I send it?
Q) Is there a limit to the number of prepared statements?

A) No practical limit. You have to have enough memory to hold them all.