mate_query.cpg.models.core.base module

A base class for declarative mapping, with extra functionality.

See https://docs.sqlalchemy.org/en/13/orm/extensions/declarative/mixins.html#augmenting-the-base

class mate_query.cpg.models.core.base.Base

Bases: object

attributes = Column(None, JSONB(astext_type=Text()), table=None, nullable=False)
classmethod find_by(**kwargs: Any) mate_query.cpg.models.core.base.T
Parameters

kwargs (Any) –

Return type

mate_query.cpg.models.core.base.T

classmethod from_uuid(uuid: str) mate_query.cpg.models.core.base.T
Parameters

uuid (str) –

Return type

mate_query.cpg.models.core.base.T

local: Any = <_thread._local object>
uuid = Column('uuid', String(), table=None, primary_key=True, nullable=False)
mate_query.cpg.models.core.base.enum_column(name: str, klass: Type[enum.Enum]) sqlalchemy.sql.schema.Column

Create an enum column named name from the given enum.Enum subclass.

Parameters
  • name (str) –

  • klass (Type[enum.Enum]) –

Return type

sqlalchemy.sql.schema.Column

mate_query.cpg.models.core.base.uuid_column() sqlalchemy.sql.schema.Column
Return type

sqlalchemy.sql.schema.Column