Home | Trees | Indices | Help |
|
---|
|
Basic support for communicating with the database server.
This is currently very postgres specific. If we really wanted to support some other database, this would need massive refactoring.
Classes | |
Error | |
SqlSetAdapter is an adapter that formats python sequences as SQL sets. |
|
SqlArrayAdapter An adapter that formats python lists as SQL arrays |
|
FloatableAdapter An adapter for things that do "float", in particular numpy.float* |
|
IntableAdapter An adapter for things that do "int", in particular numpy.int* |
|
NULLAdapter An adapter for things that should end up as NULL in the DB. |
|
DebugCursor | |
GAVOConnection A psycopg2 connection with some additional methods. |
|
DebugConnection | |
NullConnection A standin to pass whereever a function wants a connection but doesn't actually need one in a particular situation. |
|
PostgresQueryMixin is a mixin containing various useful queries that are postgres specific. |
|
StandardQueryMixin is a mixin containing various useful queries that should work agains all SQL systems. |
|
QuerierMixin is a mixin for "queriers", i.e., objects that maintain a db connection. |
|
UnmanagedQuerier A simple interface to querying the database through a connection managed by someone else. |
|
AdhocQuerier A simple interface to querying the database through pooled connections. |
|
CustomConnectionPool A threaded connection pool that returns connections made via profileName. |
|
adapter An adapter for things that do "int", in particular numpy.int* |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
debug = False
|
|
NUMERIC_TYPES =
|
|
ORDERED_TYPES =
|
|
JOIN_FUNCTION_BODY =
|
|
__package__ =
|
|
numpyType =
|
Function Details |
returns an enhanced database connection through profile. You will typically rather use the context managers for the standard profiles (``getTableConnection`` and friends). Use this function if you want to keep your connection out of connection pools or if you want to use non-standard profiles. profile will usually be a string naming a profile defined in ``GAVO_ROOT/etc``. |
returns digits from a postgres server banner. This hardcodes the response given by postgres 8 and raises a ValueError if the expected format is not found. |
adds/overwrites (key, value) in the dc.metastore table within conn. conn must be an admin connection; this does not commit. key must be a string, value something unicodeable. |
returns the value for key from within dc.metastore. This always returns a unicode string. Type conversions are the client's business. If no value exists, this raises a KeyError. |
A context manager setting and resetting runtimeVals in conn. You pass just pass keyword arguments corresponding to postgres runtime configuration items (as in SET and SHOW). The manager obtains their previous values and restores them before exiting. When the controlled body is terminated by a DBError, the settings are not reset. If you set isLocal=False, this works for autocommitted connections, too (and in that case the reset of the run-time parameters will be attempted even when DBErrors occurred. Since it's so frequent, you can pass timeout to give a statement_timeout in seconds.
|
Variables Details |
NUMERIC_TYPES
|
ORDERED_TYPES
|
JOIN_FUNCTION_BODY
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |