Expand description
Schema definitions for the surreal-sync framework.
This module defines schema types for both database introspection and data generation.
§Type Hierarchy
Base types (context-neutral, no generators):
ColumnDefinition- Single column metadataTableDefinition- Table with columns (no generators)DatabaseSchema- Collection of tables (no generators)
Generator types (embed base types, include generators):
GeneratorFieldDefinition- Field with generator configGeneratorIDDefinition- Primary key with generator configGeneratorTableDefinition- Table with generatorsGeneratorSchema- Full schema with generators
§Usage
- Use base types for schema introspection during sync operations
- Use generator types for test data generation (YAML schema files)
Structs§
- Column
Definition - Column definition - shared by both introspection and generation.
- Database
Schema - Database schema (collection of tables, no generators).
- Generator
Field Definition - Field with generator config. Embeds ColumnDefinition.
- GeneratorID
Definition - Primary key with generator config.
- Generator
Schema - Full schema with generators.
- Generator
Table Definition - Table with generators. For test data generation.
- Table
Definition - Table schema definition (no generators).
Enums§
- Generator
Config - Generator configuration for a field.
- Schema
Error - Error type for schema operations.
Type Aliases§
- Field
Definition - Type alias for backwards compatibility.
Old
FieldDefinitionis nowGeneratorFieldDefinition. - IDDefinition
- Type alias for backwards compatibility.
Old
IDDefinitionis nowGeneratorIDDefinition. - Schema
- Type alias for backwards compatibility.
Schemais nowGeneratorSchema. - Table
Definition With Generators - Type alias for backwards compatibility.
Old
TableDefinition(with generators) is nowGeneratorTableDefinition.