MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / _get_sqlmodel_field_value

Function _get_sqlmodel_field_value

sqlmodel/main.py:226–232  ·  view source on GitHub ↗
(
    field_info: Any, attribute: str, default: Any = Undefined
)

Source from the content-addressed store, hash-verified

224
225
226def _get_sqlmodel_field_value(
227 field_info: Any, attribute: str, default: Any = Undefined
228) -> Any:
229 metadata = _get_sqlmodel_field_metadata(field_info)
230 if metadata is not None and hasattr(metadata, attribute):
231 return getattr(metadata, attribute)
232 return getattr(field_info, attribute, default)
233
234
235# include sa_type, sa_column_args, sa_column_kwargs

Callers 2

get_sqlalchemy_typeFunction · 0.85
get_column_from_fieldFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…