gino.dialects.asyncpg module¶
-
class
gino.dialects.asyncpg.AsyncEnum(*enums, **kw)[source]¶ Bases:
sqlalchemy.dialects.postgresql.base.ENUMConstruct an
ENUM.Arguments are the same as that of
types.Enum, but also including the following parameters.- Parameters
create_type – Defaults to True. Indicates that
CREATE TYPEshould be emitted, after optionally checking for the presence of the type, when the parent table is being created; and additionally thatDROP TYPEis called when the table is dropped. WhenFalse, no check will be performed and noCREATE TYPEorDROP TYPEis emitted, unlesscreate()ordrop()are called directly. Setting toFalseis helpful when invoking a creation scheme to a SQL file without access to the actual database - thecreate()anddrop()methods can be used to emit SQL to a target bind.
-
class
gino.dialects.asyncpg.AsyncpgCompiler(dialect, statement, column_keys=None, inline=False, **kwargs)[source]¶ Bases:
sqlalchemy.dialects.postgresql.base.PGCompilerConstruct a new
SQLCompilerobject.- Parameters
dialect –
Dialectto be usedstatement –
ClauseElementto be compiledcolumn_keys – a list of column names to be compiled into an INSERT or UPDATE statement.
inline – whether to generate INSERT statements as “inline”, e.g. not formatted to return any generated defaults
kwargs – additional keyword arguments to be consumed by the superclass.
-
property
bindtemplate¶
-
class
gino.dialects.asyncpg.AsyncpgCursor(context, cursor)[source]¶ Bases:
gino.dialects.base.Cursor
-
class
gino.dialects.asyncpg.AsyncpgDBAPI[source]¶ Bases:
gino.dialects.base.BaseDBAPI-
Error= (<class 'asyncpg.exceptions._base.PostgresError'>, <class 'asyncpg.exceptions._base.InterfaceError'>)¶
-
-
class
gino.dialects.asyncpg.AsyncpgDialect(*args, **kwargs)[source]¶ Bases:
sqlalchemy.dialects.postgresql.base.PGDialect,gino.dialects.base.AsyncDialectMixin-
colspecs= {<class 'sqlalchemy.sql.sqltypes.Interval'>: <class 'sqlalchemy.dialects.postgresql.base.INTERVAL'>, <class 'sqlalchemy.sql.sqltypes.Enum'>: <class 'gino.dialects.asyncpg.AsyncEnum'>, <class 'sqlalchemy.sql.sqltypes.JSON.JSONPathType'>: <class 'sqlalchemy.dialects.postgresql.json.JSONPathType'>, <class 'sqlalchemy.sql.sqltypes.JSON'>: <class 'sqlalchemy.dialects.postgresql.json.JSON'>, <class 'sqlalchemy.sql.sqltypes.ARRAY'>: <class 'sqlalchemy.dialects.postgresql.array.ARRAY'>, <class 'sqlalchemy.dialects.postgresql.base.ENUM'>: <class 'gino.dialects.asyncpg.AsyncEnum'>, <class 'sqlalchemy.sql.sqltypes.NullType'>: <class 'gino.dialects.asyncpg.GinoNullType'>}¶
-
cursor_cls¶ alias of
DBAPICursor
-
dbapi_class¶ alias of
AsyncpgDBAPI
-
driver= 'asyncpg'¶
-
execution_ctx_cls¶ alias of
AsyncpgExecutionContext
-
init_kwargs= {'command_timeout', 'connection_class', 'database', 'host', 'init', 'loop', 'max_cacheable_statement_size', 'max_cached_statement_lifetime', 'max_inactive_connection_lifetime', 'max_queries', 'max_size', 'min_size', 'passfile', 'password', 'port', 'server_settings', 'setup', 'ssl', 'statement_cache_size', 'timeout', 'user'}¶
-
on_connect()[source]¶ return a callable which sets up a newly created DBAPI connection.
This is used to set dialect-wide per-connection options such as isolation modes, unicode modes, etc.
If a callable is returned, it will be assembled into a pool listener that receives the direct DBAPI connection, with all wrappers removed.
If None is returned, no listener will be generated.
-
statement_compiler¶ alias of
AsyncpgCompiler
-
supports_native_decimal= True¶
-
-
class
gino.dialects.asyncpg.AsyncpgExecutionContext[source]¶ Bases:
gino.dialects.base.ExecutionContextOverride,sqlalchemy.dialects.postgresql.base.PGExecutionContext
-
class
gino.dialects.asyncpg.DBAPICursor(dbapi_conn)[source]¶ Bases:
gino.dialects.base.DBAPICursor-
property
description¶
-
property
-
class
gino.dialects.asyncpg.GinoNullType[source]¶ Bases:
sqlalchemy.sql.sqltypes.NullType-
result_processor(dialect, coltype)[source]¶ Return a conversion function for processing result row values.
Returns a callable which will receive a result row column value as the sole positional argument and will return a value to return to the user.
If processing is not necessary, the method should return
None.- Parameters
dialect – Dialect instance in use.
coltype – DBAPI coltype argument received in cursor.description.
-
-
class
gino.dialects.asyncpg.NullPool(url, loop, **kwargs)[source]¶ Bases:
gino.dialects.base.Pool-
property
raw_pool¶
-
property
-
class
gino.dialects.asyncpg.Pool(url, loop, **kwargs)[source]¶ Bases:
gino.dialects.base.Pool-
property
raw_pool¶
-
property
-
class
gino.dialects.asyncpg.Transaction(tx)[source]¶ Bases:
gino.dialects.base.Transaction-
property
raw_transaction¶
-
property