suou.sqlalchemy.orm

Utilities for SQLAlchemy; ORM

New in 0.6.0 (moved)

Functions

a_relationship([primary, j, lazy])

Shorthand for relationship() that sets lazy='selectin' by default.

age_pair(*[, nullable])

Return a SIS-compliant age representation, i.e. a date and accuracy pair.

author_pair(fk_name, *[, id_type, sig_type, ...])

Return an owner ID/signature column pair, for authenticated values.

bool_column([value, nullable])

Column for a single boolean value.

bound_fk(target[, typ])

Shorthand for creating a "bound" foreign key column from a column name, the referenced column.

declarative_base(domain_name, master_secret)

Drop-in replacement for sqlalchemy.orm.declarative_base() taking in account requirements for SIQ generation (i.e. domain name).

id_column(typ, *[, primary_key])

Marks a column which contains a SIQ.

match_column(length, regex, /[, case, ...])

Syntactic sugar to create a String() column with a check constraint matching the given regular expression.

match_constraint(col_name, regex, /[, ...])

Shorthand for a check constraint.

parent_children(keyword, /, *[, lazy])

Self-referential one-to-many relationship pair.

secret_column(length, max_length, gen, bytes] =)

Column filled in by default with random bits (64 by default).

snowflake_column(*[, primary_key])

Same as id_column() but with snowflakes.

unbound_fk(target[, typ])

Shorthand for creating a "unbound" foreign key column from a column name, the referenced column.

username_column([length, regex, case, nullable])

Construct a column containing a unique handle / username.

want_column(cls, col)

Return a table's column given its name.

Classes

BitSelector(column, flag)

"Virtual" column representing a single bit in an integer column (usually a BigInteger).