gino.dialects.asyncpg module¶
-
class
gino.dialects.asyncpg.
AsyncEnum
(*enums, **kw)¶ Bases:
sqlalchemy.dialects.postgresql.base.ENUM
-
create_async
(bind=None, checkfirst=True)¶
-
drop_async
(bind=None, checkfirst=True)¶
-
-
class
gino.dialects.asyncpg.
AsyncpgCompiler
(dialect, statement, column_keys=None, inline=False, **kwargs)¶ Bases:
sqlalchemy.dialects.postgresql.base.PGCompiler
-
bindtemplate
¶
-
-
class
gino.dialects.asyncpg.
AsyncpgCursor
(context, cursor)¶ Bases:
gino.dialects.base.Cursor
-
forward
(n, *, timeout=<object object>)¶
-
many
(n, *, timeout=<object object>)¶
-
next
(*, timeout=<object object>)¶
-
-
class
gino.dialects.asyncpg.
AsyncpgDBAPI
¶ Bases:
gino.dialects.base.BaseDBAPI
-
Error
= (<class 'asyncpg.exceptions._base.PostgresError'>, <class 'asyncpg.exceptions._base.InterfaceError'>)¶
-
-
class
gino.dialects.asyncpg.
AsyncpgDialect
(*args, **kwargs)¶ 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 'gino.dialects.asyncpg.AsyncpgJSONPathType'>, <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
-
get_isolation_level
(connection)¶ Given an asyncpg connection, return its isolation level.
-
has_schema
(connection, schema)¶
-
has_sequence
(connection, sequence_name, schema=None)¶ Check the existence of a particular sequence in the database.
Given a
Connection
object and a string sequence_name, return True if the given sequence exists in the database, False otherwise.
-
has_table
(connection, table_name, schema=None)¶ Check the existence of a particular table in the database.
Given a
Connection
object and a string table_name, return True if the given table (possibly within the specified schema) exists in the database, False otherwise.
-
has_type
(connection, type_name, schema=None)¶
-
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'}¶
-
init_pool
(url, loop, pool_class=None)¶
-
on_connect
()¶ 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.
-
set_isolation_level
(connection, level)¶ Given an asyncpg connection, set its isolation level.
-
statement_compiler
¶ alias of
AsyncpgCompiler
-
supports_native_decimal
= True¶
-
transaction
(raw_conn, args, kwargs)¶
-
-
class
gino.dialects.asyncpg.
AsyncpgExecutionContext
¶ Bases:
gino.dialects.base.ExecutionContextOverride
,sqlalchemy.dialects.postgresql.base.PGExecutionContext
-
class
gino.dialects.asyncpg.
AsyncpgJSONPathType
¶ Bases:
sqlalchemy.dialects.postgresql.json.JSONPathType
-
bind_processor
(dialect)¶ Return a conversion function for processing bind values.
Returns a callable which will receive a bind parameter value as the sole positional argument and will return a value to send to the DB-API.
If processing is not necessary, the method should return
None
.Parameters: dialect – Dialect instance in use.
-
-
class
gino.dialects.asyncpg.
DBAPICursor
(dbapi_conn)¶ Bases:
gino.dialects.base.DBAPICursor
-
async_execute
(query, timeout, args, limit=0, many=False)¶
-
description
¶
-
get_statusmsg
()¶
-
prepare
(context, clause=None)¶
-
-
class
gino.dialects.asyncpg.
GinoNullType
¶ Bases:
sqlalchemy.sql.sqltypes.NullType
-
result_processor
(dialect, coltype)¶ 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)¶ Bases:
gino.dialects.base.Pool
-
acquire
(*, timeout=None)¶
-
close
()¶
-
raw_pool
¶
-
release
(conn)¶
-
-
class
gino.dialects.asyncpg.
Pool
(url, loop, **kwargs)¶ Bases:
gino.dialects.base.Pool
-
acquire
(*, timeout=None)¶
-
close
()¶
-
raw_pool
¶
-
release
(conn)¶
-
-
class
gino.dialects.asyncpg.
PreparedStatement
(prepared, clause=None)¶