neuralib.sqlp.table.table_foreign_field
- neuralib.sqlp.table.table_foreign_field(table: Callable) ForeignConstraint | None[source]
- neuralib.sqlp.table.table_foreign_field(table: type[T], target: type[F]) ForeignConstraint | None
get the foreign constraint in the table that refer to the target table.
- Parameters:
table – table or a foreign constraint function/property (the function decorated by @foreign)
target – refer table
- Returns:
foreign constraint.