The RyLabs SQLite Database Library is a compact library that wraps the functionality of the SQLite database engine in LabVIEW. The database library implements a cross-platform, serverless and self-contained SQL database (*.db). This toolkit is packed into a single LabVIEW Class so all dependencies are automatically included in an application build. With a small foot, this library includes the ability to bind parameters and recall SQL transactions to increase the performance.
The RyLabs SQLite Database Library is installed to the Addons > RyLabs > SQLite palette. The palette is partitioned into database and transaction VIs. Property nodes are used to bind and collect values by stepping through SQL queries.
SQLite uses the basic SQL schema to execute transactions from a database file (*.db).
For efficency, SQL transactions can be reused and optimized through the use of binding and column steps. First a savepoint is created, then a SQL statement is prepared with the use of binding parameters ("?"). Property nodes are used to index through the bindings, for each insert in this example the SQL statement is reset and the transaction executes again with a new employee.
By default SQLite only supports large integers (U64), floats (DBL), strings (String), and binary large objects (String). Timestamps were added as either string or float data types. Unlike most database schemas dataypes are not strictly typed, this means that column types will dynamically adjust to the expected type queried.
The RyLabs SQLite Database Library comes with two drag-n-drop examples from the palette. The first creates executes and queries a basic SQL statement. The second shows an example on how to use binding parameters and collumn steps to efficiently query the database.
- LabVIEW 2013 or later
- VI Package Manager 2014 or later
Refer to https://www.sqlite.org for more information on SQLite's database engine.
Note: It wasn't until I almost finished this toolkit that James Powell's SQLite Library is also available.
Ryan Pacini
Certified LabVIEW Architect | RyLabs.com
Great minds think alike.