graflo.db.field_type_support¶
Backend support checks for schema field types and indexes (native or raise — no soft conversion).
Classes¶
UnsupportedFieldTypeError
¶
Bases: ValueError
Raised when a field type cannot be stored natively on the target backend.
Source code in graflo/db/field_type_support.py
UnsupportedIndexError
¶
UnsupportedIndexKindError
¶
Functions:¶
assert_field_type_supported(db_type, field)
¶
Raise if field cannot be stored natively on db_type.
Soft conversions (e.g. LIST → STRING/JSON) are intentionally not performed.
Source code in graflo/db/field_type_support.py
assert_index_kind_supported(db_type, index, owner)
¶
Raise if db_type cannot build index as declared on owner.
A kind the target cannot build would otherwise become a plain index, so a full-text search declared in the schema would silently match nothing.
Source code in graflo/db/field_type_support.py
assert_schema_field_types_supported(db_type, schema)
¶
Validate every schema field against backend type support.
assert_schema_indexes_supported(db_type, schema)
¶
Validate every declared vertex and edge index against backend support.
An index over exactly the fields of an identity or a secondary identity is GraFlo's own, so only its kind is checked: the backend skips it if it cannot build it.
Source code in graflo/db/field_type_support.py
assert_schema_supported(db_type, schema)
¶
Refuse a schema whose field types or indexes db_type cannot build.
Source code in graflo/db/field_type_support.py
index_limit(db_type, index, *, on_edge)
¶
The index shape db_type cannot build that index needs, or None.
Source code in graflo/db/field_type_support.py
iter_schema_fields(schema)
¶
Yield all typed property fields from vertices and edges in schema.
Source code in graflo/db/field_type_support.py
tigergraph_type_for_field(field)
¶
Return a TigerGraph attribute type string (e.g. LIST<STRING>, INT).
Logical UUID is stored as STRING (TigerGraph has no native UUID type).