co3.engines package

class co3.engines.SQLEngine(url, **kwargs)[source]

Bases: Engine

__init__(url, **kwargs)[source]
connect(timeout=None)[source]

Open a connection to the database specified by the resource. Exactly what the returned connection looks like remains relatively unconstrained given the wide variety of possible database interactions. This function should be invoked in with-statement contexts, constituting an “interaction session” with the database (i.e., allowing several actions to be performed using the same connection).

static exec_explicit(connection, statement, bind_params=None)[source]
static execute(connection, statement, bind_params=None, include_cols=False)[source]

Execute a general SQLAlchemy statement, optionally binding provided parameters and returning associated column names.

Parameters:
  • connection – database connection instance

  • statement – SQLAlchemy statement

  • bind_params

  • include_cols – whether to return