| 3981 | datum_id = Column(Integer, Identity(), primary_key=True) |
| 3982 | |
| 3983 | class Result(decl_base): |
| 3984 | __tablename__ = "result" |
| 3985 | |
| 3986 | if pk_type.plain_autoinc: |
| 3987 | result_id = Column(Integer, primary_key=True) |
| 3988 | elif pk_type.sequence: |
| 3989 | result_id = Column( |
| 3990 | Integer, |
| 3991 | Sequence("result_id_seq", start=1), |
| 3992 | primary_key=True, |
| 3993 | ) |
| 3994 | elif pk_type.identity: |
| 3995 | result_id = Column(Integer, Identity(), primary_key=True) |
| 3996 | else: |
| 3997 | pk_type.fail() |
| 3998 | |
| 3999 | lft_datum_id = Column(ForeignKey(Datum.datum_id)) |
| 4000 | |
| 4001 | lft_datum = relationship(Datum) |
| 4002 | |
| 4003 | if sentinel.implicit_not_omitted or sentinel.implicit_omitted: |
| 4004 | _sentinel = insert_sentinel( |
| 4005 | omit_from_statements=bool(sentinel.implicit_omitted), |
| 4006 | ) |
| 4007 | elif sentinel.explicit: |
| 4008 | some_uuid = Column( |
| 4009 | Uuid(), insert_sentinel=True, nullable=False |
| 4010 | ) |
| 4011 | elif sentinel.default_uuid or sentinel.default_string_uuid: |
| 4012 | _sentinel = Column( |
| 4013 | Uuid(native_uuid=bool(sentinel.default_uuid)), |
| 4014 | insert_sentinel=True, |
| 4015 | default=uuid.uuid4, |
| 4016 | ) |
| 4017 | |
| 4018 | class ResultDatum(decl_base): |
| 4019 | __tablename__ = "result_datum" |