Expand description
§chronix-core
Core data model, types, errors, and configuration for the Chronix time-series database. This crate provides the foundational types that all other Chronix crates depend on.
§Overview
- Data model:
FieldValue,SeriesKey,Point— the fundamental units of time-series data. - Exact decimals:
Decimal—mantissa × 10⁻ˢᶜᵃˡᵉfor the one class of series whose value is a legal quantity: metering, billing and settlement. Seedecimalfor why af64cannot carry those. - Schema:
MeasurementSchema,SchemaRegistry— schema-on-write with additive evolution. - Calendar buckets:
TimeBucket— the one answer to “what is a day”, shared by SQL’stime_bucket(), a rollup tier and the nativedownsample()plan, so the three cannot disagree. Seetimebucket. - Errors:
ChronixError— crate-level and top-level error hierarchy. - Configuration:
ChronixConfig,WalConfig— full database configuration with builder pattern.
Re-exports§
pub use config::AnalyticsConfig;pub use config::Checkpoints;pub use config::ChronixConfig;pub use config::ChronixConfigBuilder;pub use config::CompressionCodec;pub use config::FieldEncryption;pub use config::FloatEncoding;pub use config::FsyncPolicy;pub use config::WalConfig;pub use decimal::pow10;pub use decimal::Decimal;pub use decimal::DecimalError;pub use decimal::DECIMAL_PRECISION;pub use decimal::MAX_DECIMAL_MANTISSA;pub use decimal::MAX_DECIMAL_SCALE;pub use error::ChronixError;pub use error::ConfigError;pub use error::SchemaError;pub use error::WalError;pub use schema::ColumnDef;pub use schema::ColumnRole;pub use schema::ColumnType;pub use schema::MeasurementSchema;pub use schema::SchemaAction;pub use schema::SchemaRegistry;pub use timebucket::BucketParseError;pub use timebucket::BucketWidth;pub use timebucket::TimeBucket;pub use types::canonical_from_pairs;pub use types::push_canonical;pub use types::FieldValue;pub use types::Fields;pub use types::NamespaceId;pub use types::NamespaceQuota;pub use types::NamespaceUsage;pub use types::Point;pub use types::SegmentFile;pub use types::SegmentId;pub use types::SegmentState;pub use types::SeriesKey;pub use types::ShardId;pub use types::Tags;pub use types::Timestamp;pub use types::Tombstone;pub use types::TombstoneSet;pub use types::WalEntry;pub use types::KV_SEPARATOR;pub use types::MAX_STRING_FIELD_LENGTH;pub use types::NAMESPACE_TAG;pub use types::RESERVED_COLUMN_NAMES;pub use types::TAG_SEPARATOR;pub use types::TIME_COLUMN;pub use wal_codec::decode as wal_decode;pub use wal_codec::encode as wal_encode;pub use wal_codec::encode_write_point as wal_encode_write_point;pub use wal_codec::CodecError as WalCodecError;
Modules§
- config
- Database configuration types with builder pattern.
- decimal
- Exact fixed-point decimals.
- error
- Error types for the Chronix time-series database.
- schema
- Schema registry with schema-on-write and additive evolution.
- timebucket
- Time buckets — the one answer to “what is a day?”.
- types
- Fundamental data types for Chronix time-series data.
- wal_
codec - Compact binary codec for WAL entries.