| 3996 | datum_id = Column(Integer, Identity(), primary_key=True) |
| 3997 | |
| 3998 | class Result(decl_base): |
| 3999 | __tablename__ = "result" |
| 4000 | |
| 4001 | if pk_type.plain_autoinc: |
| 4002 | result_id = Column(Integer, primary_key=True) |
| 4003 | elif pk_type.sequence: |
| 4004 | result_id = Column( |
| 4005 | Integer, |
| 4006 | Sequence("result_id_seq", start=1), |
| 4007 | primary_key=True, |
| 4008 | ) |
| 4009 | elif pk_type.identity: |
| 4010 | result_id = Column(Integer, Identity(), primary_key=True) |
| 4011 | else: |
| 4012 | pk_type.fail() |
| 4013 | |
| 4014 | lft_datum_id = Column(ForeignKey(Datum.datum_id)) |
| 4015 | |
| 4016 | lft_datum = relationship(Datum) |
| 4017 | |
| 4018 | if sentinel.implicit_not_omitted or sentinel.implicit_omitted: |
| 4019 | _sentinel = insert_sentinel( |
| 4020 | omit_from_statements=bool(sentinel.implicit_omitted), |
| 4021 | ) |
| 4022 | elif sentinel.explicit: |
| 4023 | some_uuid = Column( |
| 4024 | Uuid(), insert_sentinel=True, nullable=False |
| 4025 | ) |
| 4026 | elif sentinel.default_uuid or sentinel.default_string_uuid: |
| 4027 | _sentinel = Column( |
| 4028 | Uuid(native_uuid=bool(sentinel.default_uuid)), |
| 4029 | insert_sentinel=True, |
| 4030 | default=uuid.uuid4, |
| 4031 | ) |
| 4032 | |
| 4033 | class ResultDatum(decl_base): |
| 4034 | __tablename__ = "result_datum" |