Provides connection to a dbtext database.
Definition at line 33 of file dbtextdb.py.
| def dbtextdb::dbtextdb::DBText::CleanUp | ( | self | ) |
Reset the internal variables (for multiple queries).
Definition at line 409 of file dbtextdb.py.
| def dbtextdb::dbtextdb::DBText::Execute | ( | self, | ||
| query, | ||||
writethru = True | ||||
| ) |
Parse and execute the query.
Args:
query: e.g. 'select * from table;'
writethru: bool
Returns:
dataset: [{col: val, col: val}, {col: val}, {col: val}]
Raises:
ExecuteError: unable to execute query
Definition at line 373 of file dbtextdb.py.
| def dbtextdb::dbtextdb::DBText::MoveTableIntoPlace | ( | self | ) |
Replace the real table with the temp one. Diff the new data against the original and replace the table when they are different.
Definition at line 1106 of file dbtextdb.py.
| def dbtextdb::dbtextdb::DBText::OpenTable | ( | self | ) |
Opens the table file and places its content into memory. Raises: ExecuteError: unable to open table
Definition at line 1027 of file dbtextdb.py.
| def dbtextdb::dbtextdb::DBText::ParseQuery | ( | self, | ||
| query | ||||
| ) |
External wrapper for the query parsing routines. Args: query: string Raises: ParseError: Unable to parse query
Definition at line 426 of file dbtextdb.py.
| def dbtextdb::dbtextdb::DBText::WriteTempTable | ( | self | ) |
Write table header and data. First write header and data to a temp file, then move the tmp file to replace the original table file.
Definition at line 1073 of file dbtextdb.py.
1.7.1