SQLite Abstraction.
More...
|
| def | __init__ (self, dbpath='app.db') |
| |
| def | open (self) |
| |
| def | createTable (self, name, primary='rowid', cols={}) |
| |
| def | addRow (self, table, vals) |
| |
| def | addRows (self, table, vals) |
| |
| def | updateRow (self, table, vals, expr='') |
| |
| def | deleteRow (self, table, expr) |
| |
| def | getRow (self, table, expr='', collist={}) |
| |
| def | getRows (self, table, expr='', order='') |
| |
|
|
| dbpath |
| |
|
| version |
| |
|
| tablecount |
| |
|
|
list | operands = [ '<', '<=', '=', '=>', '>', 'LIKE' ] |
| |
§ __init__()
| def DB.DB.__init__ |
( |
|
self, |
|
|
|
dbpath = 'app.db' |
|
) |
| |
Instances the DB object
used for interfacing with SQLite
@param dbpath
§ addRow()
| def DB.DB.addRow |
( |
|
self, |
|
|
|
table, |
|
|
|
vals |
|
) |
| |
adds a row to the SQLite database
@param table
@param vals
@return int
§ addRows()
| def DB.DB.addRows |
( |
|
self, |
|
|
|
table, |
|
|
|
vals |
|
) |
| |
adds multiple rows in a single query
@param table
@param vals
§ createTable()
| def DB.DB.createTable |
( |
|
self, |
|
|
|
name, |
|
|
|
primary = 'rowid', |
|
|
|
cols = {} |
|
) |
| |
creates an SQLite table based on the arguments
@param name
@param primary
@param cols
§ deleteRow()
| def DB.DB.deleteRow |
( |
|
self, |
|
|
|
table, |
|
|
|
expr |
|
) |
| |
deletes a row to the SQLite database
@param table
@param expr
§ getRow()
| def DB.DB.getRow |
( |
|
self, |
|
|
|
table, |
|
|
|
expr = '', |
|
|
|
collist = {} |
|
) |
| |
retrieves a row to the SQLite database
@param table
@param expr
@param collist
@return dict
§ getRows()
| def DB.DB.getRows |
( |
|
self, |
|
|
|
table, |
|
|
|
expr = '', |
|
|
|
order = '' |
|
) |
| |
retrieves multiple rows from the SQLite database
@param table
@param expr
@param order
@return dict
§ open()
Prepares the connection
@return sqlite connection
§ updateRow()
| def DB.DB.updateRow |
( |
|
self, |
|
|
|
table, |
|
|
|
vals, |
|
|
|
expr = '' |
|
) |
| |
updates a row to the SQLite database
@param table
@param vals
@param expr
The documentation for this class was generated from the following file: