Fields.sqlalchemy
respo.fields.sqlalchemy
MutableRespoClient
Bases: Mutable
, client.RespoClient
SQLAlchemy field that represent RespoClient instance, based on Mutable.
Wrapper around RespoClient instance that triggers changed() on add_role and remove_role. Overwrittes ORM that use fancy mechanisms that won't detect mutable objects changes (and won't be commited to database).
https://docs.sqlalchemy.org/en/14/orm/extensions/mutable.html
Source code in respo/fields/sqlalchemy.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
coerce(key, value)
classmethod
Transforms Python object to MutableRespoClient Field.
Source code in respo/fields/sqlalchemy.py
36 37 38 39 40 41 42 43 44 |
|
TEXTRespoField
Bases: TypeDecorator
Platform-independent Custom Type to store Respo model based on TEXT type
Source code in respo/fields/sqlalchemy.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|