dblite
1.3.0
Simple query interface for SQL databases
|
Classes | |
class | Database |
Convenience wrapper around sqlite3.Connection. More... | |
class | Queryable |
class | Transaction |
Transaction context manager, breakable by raising Rollback. More... | |
Functions | |
def | autodetect (opts) |
Returns true if input is recognizable as SQLite connection options. More... | |
def | quote (value, force=False) |
Returns identifier in quotes and proper-escaped for queries, if value needs quoting (has non-alphanumerics, starts with number, or is reserved). More... | |
def | register_adapter (transformer, typeclasses) |
Registers function to auto-adapt given Python types to SQLite types in query parameters. More... | |
def | register_converter (transformer, typenames) |
Registers function to auto-convert given SQLite types to Python types in query results. More... | |
def | register_row_factory (row_factory) |
Registers custom row factory, as or `None` to reset to default. More... | |
Variables | |
list | RESERVED_KEYWORDS |
SQLite reserved keywords, needing quotes in SQL queries. More... | |
def dblite.engines.sqlite.autodetect | ( | opts | ) |
def dblite.engines.sqlite.quote | ( | value, | |
force = False |
|||
) |
Returns identifier in quotes and proper-escaped for queries, if value needs quoting (has non-alphanumerics, starts with number, or is reserved).
value | the value to quote, returned as-is if not string |
force | whether to quote value even if not required |
def dblite.engines.sqlite.register_adapter | ( | transformer, | |
typeclasses | |||
) |
def dblite.engines.sqlite.register_converter | ( | transformer, | |
typenames | |||
) |
def dblite.engines.sqlite.register_row_factory | ( | row_factory | ) |
list dblite.engines.sqlite.RESERVED_KEYWORDS |
SQLite reserved keywords, needing quotes in SQL queries.