icydb-schema 0.219.0

Bounded public schema proposal contract for IcyDB
Documentation
//! Frozen bounds for the current proposal transport.

/// Maximum encoded size of one reusable schema fragment.
pub const MAX_SCHEMA_FRAGMENT_BYTES: usize = 512 * 1024;

/// Maximum encoded size of one database-scoped schema proposal.
pub const MAX_SCHEMA_PROPOSAL_BYTES: usize = 2 * 1024 * 1024;

/// Maximum encoded size of one coordinated source migration plan.
pub const MAX_SCHEMA_MIGRATION_PLAN_BYTES: usize = 512 * 1024;

/// Maximum byte length of one typed current-name proposal key.
pub const MAX_SOURCE_KEY_BYTES: usize = 128;

/// Maximum byte length of one current schema name.
pub const MAX_SCHEMA_NAME_BYTES: usize = MAX_SOURCE_KEY_BYTES;

/// Maximum byte length of one caller-generated submission key.
pub const MAX_SCHEMA_SUBMISSION_KEY_BYTES: usize = 128;

/// Maximum byte length of one text or blob proposal literal.
pub const MAX_PROPOSAL_LITERAL_BYTES: usize = 64 * 1024;

/// Default maximum canonical encoding for unbounded authored big integers.
pub const DEFAULT_BIG_INT_MAX_BYTES: u32 = 256;

/// Maximum number of reusable fragments in one proposal.
pub const MAX_SCHEMA_PROPOSAL_FRAGMENTS: usize = 1_024;

/// Maximum number of entity definitions in one fragment.
pub const MAX_FRAGMENT_ENTITIES: usize = 1_024;

/// Maximum number of named type definitions in one fragment.
pub const MAX_FRAGMENT_TYPES: usize = 1_024;

/// Maximum number of fields in one entity or record definition.
pub const MAX_FRAGMENT_FIELDS: usize = 256;

/// Maximum number of indexes in one entity definition.
pub const MAX_FRAGMENT_INDEXES: usize = 64;

/// Maximum number of relations in one entity definition.
pub const MAX_FRAGMENT_RELATIONS: usize = 64;

/// Maximum number of accepted constraints in one entity definition.
pub const MAX_FRAGMENT_CONSTRAINTS: usize = 256;

/// Maximum number of instructions in one source-level check expression.
pub const MAX_SOURCE_CHECK_INSTRUCTIONS: usize = 1_024;

/// Maximum inline nesting depth of one field-type contract.
///
/// Named references terminate inline traversal. The separately bounded named
/// type catalog may contain resolved cycles without recursively expanding
/// their definitions.
pub const MAX_SCHEMA_FIELD_TYPE_DEPTH: usize = 64;

/// Maximum number of explicit removals in one proposal.
pub const MAX_SCHEMA_REMOVALS: usize = 4_096;

/// Maximum number of entity-to-store assignments in one proposal.
pub const MAX_SCHEMA_ASSIGNMENTS: usize = 4_096;

/// Maximum number of required capabilities in one proposal.
pub const MAX_SCHEMA_CAPABILITIES: usize = 32;

/// Maximum number of entity transitions in one coordinated migration plan.
pub const MAX_SCHEMA_MIGRATION_ENTITIES: usize = MAX_SCHEMA_ASSIGNMENTS;

/// Maximum number of explicit rename operations for one entity transition.
pub const MAX_SCHEMA_MIGRATION_RENAMES: usize = MAX_SCHEMA_ASSIGNMENTS;

/// Maximum number of explicit transforms for one entity transition.
pub const MAX_SCHEMA_MIGRATION_TRANSFORMS: usize = MAX_SCHEMA_ASSIGNMENTS;