intro.bbdoc 1.7 KB

12345678910111213141516171819202122232425
  1. <a href="http://www.sqlite.org/"><img src="sqlite_logo.png" border="0" align="right" /></a>
  2. <p>
  3. The DBSQLite database driver allows you to connect to SQLite databases through the standard API provided
  4. by the Database Framework module.
  5. </p>
  6. <h2>Requirements</h2>
  7. <p>Everything you need to compile and work with SQLite databases is provided with the module, including the source to SQLite itself.<br>
  8. There are no external requirements.
  9. </p>
  10. <h2>Accessing an SQLite Database</h2>
  11. <p>To enable an SQLite connection, you pass a <i>dbtype</i> of &quot;<b>SQLITE</b>&quot; to the
  12. <a href="../../database.mod/doc/commands.html#LoadDatabase">LoadDatabase</a> function.
  13. </p>
  14. <p>The second parameter, <i>dbname</i>, should be either an SQLite database file (either an existing one, or the
  15. name of one you wish to create), or &quot;<b>:memory:</b>&quot;, which will create an in-memory database.<br>
  16. Note that in-memory databases last only as long as the connection is open.
  17. </p>
  18. <p><i>Host</i>, <i>port</i>, <i>user</i> and <i>password</i> parameters are not required for this driver.
  19. </p>
  20. <h2>Prepared Statement Placeholders</h2>
  21. <p>SQLite can have placeholders of the form "?" or "?nnn" or ":aaa" where "nnn" is an integer and "aaa" is an identifier. Each placeholder has an associated number which is its sequence in the query or the "nnn" in the case of a "?nnn" form. It is allowed for the same valued-placeholder to occur more than once in the same SQL, in which case all instances of that placeholder will be filled in with the same value.
  22. </p>
  23. <h2>SQL with SQLite</h2>
  24. <p>For a complete guide to SQLite's support of SQL92, we have provided the <a href="syntax/lang.html">SQL reference documentation</a>.
  25. </p>