hapcat.types

Hapcat database model custom types.

class hapcat.types.GUID(*args, **kwargs)[source]

Bases: sqlalchemy.sql.type_api.TypeDecorator

A platform-independent GUID type.

This uses PostgreSQL’s UUID type, otherwise using CHAR(32), storing as stringified hex values.

This is taken from the SQLAlchemy examples with minor modifications.

__module__ = 'hapcat.types'
impl

alias of CHAR

load_dialect_impl(dialect)[source]
process_bind_param(value, dialect)[source]
process_result_value(value, dialect)[source]