Skip to main content

Crate sim_relation_core

Crate sim_relation_core 

Source
Expand description

Open relational records built directly on the kernel data substrate.

A logical domain is a DomainSpec in a DomainCatalog, not an enum variant. Storage providers consume its StorageRepr, while runtime Shape resolution is deliberately left to sim-relation-shape.

use sim_kernel::{Ref, Symbol};
use sim_relation_core::{DomainCatalog, DomainId, DomainSpec, DomainTrait, StorageRepr};

let uuid = DomainSpec::new(
    DomainId::new(Symbol::qualified("example", "uuid")).unwrap(),
    StorageRepr::Text,
    Ref::Symbol(Symbol::qualified("example", "UuidShape")),
    [DomainTrait::Equatable, DomainTrait::Ordered],
).unwrap();
let catalog = DomainCatalog::new([uuid]).unwrap();
assert!(catalog.get(&DomainId::new(Symbol::qualified("example", "uuid")).unwrap()).is_some());

Structs§

BindingName
A query binding name.
Cell
A cell: None is typed SQL NULL; Some contains ordinary SIM data.
ColumnName
A column name.
ConstraintName
A constraint name.
DomainCatalog
A validated collection of open domain declarations.
DomainId
An open logical-domain identifier.
DomainSpec
An open logical-domain declaration.
FieldName
A projected field name.
FieldType
A named field’s logical type.
IndexName
An index name.
ParameterName
A parameter name.
ProviderName
A storage provider name.
RelationId
Typed identity for any relational record.
RevisionName
A revision name.
Row
A row checked against a row type.
RowType
A validated ordered row type.
SchemaName
A logical schema name.
SourceName
A relational source name.
TableName
A table name.
ViewName
A relational view name.

Enums§

BaseDomain
The five portable base domains.
DomainError
Domain validation or conversion failure.
DomainTrait
A semantic promise made by a logical domain.
NameError
Validation failure for a relational symbolic name.
RowError
Row construction failure.
StorageRepr
Exact physical representation requested from a storage provider.
StorageValue
An exact value at the provider boundary.

Traits§

ToRelationDatum
Canonical projection shared by identity, Card data, and Lisp data faces.