(P) storage¶
(M) AlembicEnvBase¶
(M) DbConnection¶
(M) LoadPayloadPgUtil¶
(M) RunPyInPg¶
(M) StorageUtil¶
-
peek_plugin_base.storage.StorageUtil.
makeCoreValuesSubqueryCondition
(engine, column, values: List[Union[int, str]])[source]¶ Make Core Values Subquery
Parameters: - engine – The database engine, used to determine the dialect
- column – The column, eg TableItem.__table__.c.colName
- values – A list of string or int values
-
peek_plugin_base.storage.StorageUtil.
makeOrmValuesSubqueryCondition
(ormSession, column, values: List[Union[int, str]])[source]¶ Make Orm Values Subquery
Parameters: - ormSession – The orm session instance
- column – The column from the Declarative table, eg TableItem.colName
- values – A list of string or int values
(M) TypeDecorators¶
-
class
peek_plugin_base.storage.TypeDecorators.
PeekLargeBinary
(*args, **kwargs)[source]¶ Bases:
sqlalchemy.sql.type_api.TypeDecorator
Peek Large Binary
Construct a
TypeDecorator
.Arguments sent here are passed to the constructor of the class assigned to the
impl
class level attribute, assuming theimpl
is a callable, and the resulting object is assigned to theself.impl
instance attribute (thus overriding the class attribute of the same name).If the class level
impl
is not a callable (the unusual case), it will be assigned to the same instance attribute ‘as-is’, ignoring those arguments passed to the constructor.Subclasses can override this to customize the generation of
self.impl
entirely.-
bind_expression
(bindvalue)[source]¶ Given a bind value (i.e. a
BindParameter
instance), return a SQL expression in its place.This is typically a SQL function that wraps the existing bound parameter within the statement. It is used for special data types that require literals being wrapped in some special database function in order to coerce an application-level value into a database-specific format. It is the SQL analogue of the
TypeEngine.bind_processor()
method.The method is evaluated at statement compile time, as opposed to statement construction time.
Note that this method, when implemented, should always return the exact same structure, without any conditional logic, as it may be used in an executemany() call against an arbitrary number of bound parameter sets.
See also
types_sql_value_processing
-
impl
¶ alias of
sqlalchemy.sql.sqltypes.LargeBinary
-