Sqlite Toolkit - sqlite
- :
db =
sqlite(filename)
- :
db =
sqlite(filename, mode)
Create a sqlite database connection
Inputs
filename
Filename of the sqlite database
mode
mode for the sqlite access ’readonly’, ’connect’ (default), ’create’.
Outputs
db
a opened SQLITE database as a octave_sqlite object
Object Properties
The octave_sqlite object has the following properties:
- Database
The name of the opened database file (readonly)
- IsOpen
Boolean field for if the database is currently open (readonly)
- IsReadOnly
Boolean field for if the database was opened in readonly mode. (readonly)
- AutoCommit
String flag field for whether database is in auto commit mode. "on" (default) or "off".
Examples
Open a sqlite database, failing if it does not exist.
db = sqlite("mytest.db");
Open a sqlite database, creating it if it does not exist.
db = sqlite("mytest.db", "create");