dblite  1.3.0
Simple query interface for SQL databases
postgres.py File Reference

Go to the source code of this file.

Classes

class  dblite.engines.postgres.Database
 Convenience wrapper around psycopg2.ConnectionPool and Cursor. More...
 
class  dblite.engines.postgres.Identifier
 Wrapper for table and column names from data objects. More...
 
class  dblite.engines.postgres.Queryable
 
class  dblite.engines.postgres.RowFactoryCursor
 A cursor that generates result rows via given factory callable. More...
 
class  dblite.engines.postgres.Transaction
 Transaction context manager, provides convenience methods for queries. More...
 

Namespaces

 dblite.engines.postgres
 

Functions

def dblite.engines.postgres.autodetect (opts)
 Returns true if input is recognizable as Postgres connection options. More...
 
def dblite.engines.postgres.make_db_url (opts)
 Returns Postgres connection options as URL, like `"postgresql://host/dbname"`. More...
 
def dblite.engines.postgres.query_schema (queryable, keys=False, views=False, inheritance=False)
 Returns database table structure populated from given database. More...
 
def dblite.engines.postgres.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 dblite.engines.postgres.register_adapter (transformer, typeclasses)
 Registers function to auto-adapt given Python types to Postgres types in query parameters. More...
 
def dblite.engines.postgres.register_converter (transformer, typenames)
 Registers function to auto-convert given Postgres types to Python types in query results. More...
 
def dblite.engines.postgres.register_row_factory (row_factory)
 Registers custom row factory, as or `None` to reset to default. More...
 

Variables

list dblite.engines.postgres.RESERVED_KEYWORDS
 Postgres reserved keywords, needing quotes in SQL queries. More...