-
Notifications
You must be signed in to change notification settings - Fork 2
Octave SQLITE Toolkit
The Octave SQLITE toolkit is a set of SQLITE routines for GNU Octave
Full documentation for using the toolkit is availble at https://gnu-octave.github.io/octave-sqlite/
Quick overview is below:
The toolkit has a dependency on the SQLITE library (https://www.sqlite.org/), so it must be installed in order to successfully install the toolkit.
The toolkit must be then be loaded once per each GNU Octave session in order to use its functionality.
With an internet connection available, the octave sqlite package can be installed from the octave-sqlite website using the following command within GNU Octave:
pkg install https://github.com/gnu-octave/octave-sqlite/releases/download/v0.0.2/octave-sqlite-0.0.2.tar.gz
On Octave 7.2 and later, the package can be installed using the following command within GNU Octave:
pkg install -forge sqlite
The latest released version of the toolkit will be downloaded and installed.
Regardless of the method of installing the toolkit, in order to use its functions, the toolkit must be loaded using the pkg load command:
pkg load sqlite
The toolkit must be loaded on each GNU Octave session.
Connection to the database is done using the sqlite function.
Example:
db = sqlite('testdb.db')
db =
sqlite with properties
Database: testdb.db
IsReadOnly: 0
AutoCommit: on
To quickly read data from a table, use the sqlread function
Example:
data = sqlread(db, "TestTable")
To close the database, use the close function
Example:
close(db)
See the documentation (https://gnu-octave.github.io/octave-sqlite/) for full usage of the toolkit