module tarantool.schema
¶
Schema types definitions. For internal use only, there is no API to use pre-build schema objects.
- exception tarantool.schema.RecursionError¶
Report the situation when max recursion depth is reached.
This is an internal error of
to_unicode_recursive()
caller and it should be re-raised properly by the caller.- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class tarantool.schema.Schema(con)¶
Contains Tarantool server spaces schema.
- Parameters
con¶ (
Connection
) – Related Tarantool server connection.
- fetch_index(space_object, index)¶
Fetch a single index space schema from the Tarantool server and build a schema object.
- Parameters
space¶ (
SchemaSpace
) – Space schema.
- Return type
- Raises
SchemaError
,fetch_index_from()
exceptions
- fetch_index_all()¶
Fetch all spaces indexes schema from the Tarantool server and build corresponding schema objects.
- Raises
fetch_index_from()
exceptions
- fetch_index_from(space, index)¶
Fetch space index schema from the Tarantool server.
- fetch_space(space)¶
Fetch a single space schema from the Tarantool server and build a schema object.
- Parameters
- Return type
- Raises
SchemaError
,fetch_space_from()
exceptions
- fetch_space_all()¶
Fetch all spaces schema from the Tarantool server and build corresponding schema objects.
- Raises
fetch_space_from()
exceptions
- fetch_space_from(space)¶
Fetch space schema from the Tarantool server.
- flush()¶
Clean existing schema data.
- get_field(space, field)¶
Get space field format info.
- Parameters
- Returns
Field format info.
- Return type
- Raises
SchemaError
,fetch_space()
exceptions
- get_index(space, index)¶
Get space index schema. If it exists in the local schema, return local data, otherwise fetch data from the Tarantool server.
- Parameters
- Return type
- Raises
fetch_index()
exceptions
- get_space(space)¶
Get space schema. If it exists in the local schema, return local data, otherwise fetch data from the Tarantool server.
- Parameters
- Return type
- Raises
fetch_space()
exceptions