metadata sqlalchemy code example
Example: sqlalchemy metadata
employees.columns.employee_id
employees.c.employee_id
employees.c['employee_id']
for c in employees.c:
print(c)
for primary_key in employees.primary_key:
print(primary_key)
for fkey in employees.foreign_keys:
print(fkey)
employees.metadata
employees.bind
employees.c.employee_id.name
employees.c.employee_id.type
employees.c.employee_id.nullable
employees.c.employee_id.primary_key
employees.c.employee_dept.foreign_keys
employees.c.employee_name.key
employees.c.employee_id.table is employees
list(employees.c.employee_dept.foreign_keys)[0].column.table