Skip to content

Refactor Table class to provide all metadata as system columns. #169

@giant0791

Description

@giant0791

Currently, the Table class stores metadata like database id or title as attributes.
This causes several if-else branching when creating or reflecting tables in DDL statements.
Refactor the class in such a way that all metadata are system classes and the database_id or title are computed properties.

students = Table('students', metadata, Column('name', String(is_title=True)))

assert students.id is None      # id is not None after execution of CreateTable
assert students.c[SysCol.NO_ID] == students.get_oid()
assert students.c[SysCol.NO_TITLE] == students.name

Metadata

Metadata

Assignees

Labels

featureGroup together issues making up a full feature. It creates a parent-child relation with its issues.

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions