Attention
This is the documentation for HARP Proxy, actually published as an early preview. Both the software and documentation are a work in progress, and although we already use it on various production servers, they may contain inaccuracies, typographical errors, huge mistakes and empty pages. We work hard to eradicate all mistakes and implement stuff, but it is a long and tedious process. We appreciate your patience and understanding. Of course, any help will be greatly appreciated.
harp_apps.sqlalchemy_storage.models.base¶
- class Base[source]¶
Bases:
AsyncAttrs,DeclarativeBaseA simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- __init__(**kwargs)¶
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- metadata: ClassVar[MetaData] = MetaData()¶
Refers to the
_schema.MetaDatacollection that will be used for new_schema.Tableobjects.See also
orm_declarative_metadata
- registry: ClassVar[_RegistryType] = <sqlalchemy.orm.decl_api.registry object>¶
Refers to the
_orm.registryin use where new_orm.Mapperobjects will be associated.
- class Repository[source]¶
Bases:
Generic[TRow]- async find_one(values, /, session, **select_kwargs)[source]¶
- Parameters:
values (dict)
- Return type:
TRow
- async find_one_by_id(id, /, session=None, **select_kwargs)[source]¶
- Parameters:
id (str)
- Return type:
TRow
- async find_or_create_one(values, /, session, defaults=None, **select_kwargs)[source]¶
- Parameters:
values (dict)
- Return type:
TRow
- Type: TRow = None¶