Jiggy 0.26 |
SQLiteLets you create and manipulate SQLite databases. Summary
lastInsertRowId
Returns the row id of the last successful insert. See http://sqlite.org/c3ref/last_insert_rowid.html select
Executes the given query and returns an array of rows. The first array will contain the column names. parameters
returnsAn array of string arrays. The first array is the column names, the rest are all the values. If there is an error, it returns NULL. If the query returned no rows, an empty array is returned. exampledb.select( "SELECT First , Last FROM ABPerson" ); returns [ [ "First" , "Last" ] , [ "John" , "Doe" ] , [ "Madonna" , null ] ] dataFromField
Returns raw data for the first column in the first row returned by the query. You should typically use a query that returns a single row and a single column. parameters
returns
examplevar imageData = imageDB.dataFromField( "select data from ABImage where record_id = 148 and format = 0" ); |
Opens a database.
SQLite( string fileName )
Closes the database and renders this instance of SQLite useless.
close()
Returns the row id of the last successful insert.
int lastInsertRowId readonly
Executes the given query and returns an array of rows.
jsval select( string query )
Executes a statement and does not return any results.
bool execute( string statement )
Returns raw data for the first column in the first row returned by the query.
Data dataFromField( string query )