kotti.sqla¶
Inheritance Diagram¶
- class kotti.sqla.JsonType(*args, **kwargs)[source]¶
http://www.sqlalchemy.org/docs/core/types.html#marshal-json-strings
- impl¶
alias of
Text
- static process_bind_param(value, dialect)[source]¶
Receive a bound parameter value to be converted.
Custom subclasses of
_types.TypeDecorator
should override this method to provide custom behaviors for incoming data values. This method is called at statement execution time and is passed the literal Python data value which is to be associated with a bound parameter in the statement.The operation could be anything desired to perform custom behavior, such as transforming or serializing data. This could also be used as a hook for validating logic.
- Parameters
value – Data to operate upon, of any type expected by this method in the subclass. Can be
None
.dialect – the
Dialect
in use.
See also
types_typedecorator
_types.TypeDecorator.process_result_value()
- static process_result_value(value, dialect)[source]¶
Receive a result-row column value to be converted.
Custom subclasses of
_types.TypeDecorator
should override this method to provide custom behaviors for data values being received in result rows coming from the database. This method is called at result fetching time and is passed the literal Python data value that’s extracted from a database result row.The operation could be anything desired to perform custom behavior, such as transforming or deserializing data.
- Parameters
value – Data to operate upon, of any type expected by this method in the subclass. Can be
None
.dialect – the
Dialect
in use.
See also
types_typedecorator
_types.TypeDecorator.process_bind_param()
- class kotti.sqla.ACLType(*args, **kwargs)[source]¶
- process_bind_param(value, dialect)[source]¶
Receive a bound parameter value to be converted.
Custom subclasses of
_types.TypeDecorator
should override this method to provide custom behaviors for incoming data values. This method is called at statement execution time and is passed the literal Python data value which is to be associated with a bound parameter in the statement.The operation could be anything desired to perform custom behavior, such as transforming or serializing data. This could also be used as a hook for validating logic.
- Parameters
value – Data to operate upon, of any type expected by this method in the subclass. Can be
None
.dialect – the
Dialect
in use.
See also
types_typedecorator
_types.TypeDecorator.process_result_value()
- process_result_value(value, dialect)[source]¶
Receive a result-row column value to be converted.
Custom subclasses of
_types.TypeDecorator
should override this method to provide custom behaviors for data values being received in result rows coming from the database. This method is called at result fetching time and is passed the literal Python data value that’s extracted from a database result row.The operation could be anything desired to perform custom behavior, such as transforming or deserializing data.
- Parameters
value – Data to operate upon, of any type expected by this method in the subclass. Can be
None
.dialect – the
Dialect
in use.
See also
types_typedecorator
_types.TypeDecorator.process_bind_param()
- class kotti.sqla.MutationDict(data)[source]¶
http://www.sqlalchemy.org/docs/orm/extensions/mutable.html
- classmethod coerce(key, value)[source]¶
Given a value, coerce it into the target type.
Can be overridden by custom subclasses to coerce incoming data into a particular type.
By default, raises
ValueError
.This method is called in different scenarios depending on if the parent class is of type
Mutable
or of typeMutableComposite
. In the case of the former, it is called for both attribute-set operations as well as during ORM loading operations. For the latter, it is only called during attribute-set operations; the mechanics of thecomposite()
construct handle coercion during load operations.- Parameters
key – string name of the ORM-mapped attribute being set.
value – the incoming value.
- Returns
the method should return the coerced value, or raise
ValueError
if the coercion cannot be completed.
- class kotti.sqla.MutationList(data)[source]¶
- classmethod coerce(key, value)[source]¶
Given a value, coerce it into the target type.
Can be overridden by custom subclasses to coerce incoming data into a particular type.
By default, raises
ValueError
.This method is called in different scenarios depending on if the parent class is of type
Mutable
or of typeMutableComposite
. In the case of the former, it is called for both attribute-set operations as well as during ORM loading operations. For the latter, it is only called during attribute-set operations; the mechanics of thecomposite()
construct handle coercion during load operations.- Parameters
key – string name of the ORM-mapped attribute being set.
value – the incoming value.
- Returns
the method should return the coerced value, or raise
ValueError
if the coercion cannot be completed.
- kotti.sqla.wrapper_class¶
alias of
MutationList