Skip to main content

radixdb_core/
lib.rs

1//! Canonical value, identity, and shared contracts used by RadixDB crates.
2//!
3//! This is a private implementation crate, not an application dependency.
4//! External embedded applications use the public types re-exported by
5//! `radixdb`; lower crates use this owner directly to keep type identity.
6
7pub mod checksum;
8pub mod compact_arc;
9pub mod compact_vec;
10pub mod cow_btree;
11pub mod error;
12pub mod form_descriptor;
13pub mod i64_map;
14pub mod identity;
15pub mod params;
16pub mod row;
17pub mod row_vec;
18pub mod schema;
19pub mod schema_descriptor;
20pub mod smart_string;
21pub mod string_map;
22pub mod time_compat;
23pub mod types;
24pub mod unicode;
25pub mod value;
26pub mod vector;
27
28#[doc(hidden)]
29pub use checksum::{crc32_ieee, derive_plugin_object_identity_bytes, sha256_digest};
30pub use compact_arc::{CompactArc, CompactArcDrop};
31pub use compact_vec::CompactVec;
32pub use cow_btree::CowBTree;
33pub use error::{Error, ErrorCategory, ErrorCode, ErrorContext, NavigationErrorCode, Result};
34pub use form_descriptor::{
35    EditorKind, FormFieldDescriptor, ReferenceSelector, TableFormDescriptor,
36};
37pub use i64_map::{I64Map, I64Set};
38#[doc(hidden)]
39pub use identity::new_durable_identity_bytes;
40pub use identity::{SchemaColumnId, SchemaTableId};
41pub use params::ParamVec;
42pub use row::{Row, RowColumnRef, RowIter, RowIterMut, RowSchema};
43pub use row_vec::{RowIdVec, RowVec};
44#[doc(hidden)]
45pub use schema::generated_constraint_name;
46pub use schema::{
47    ForeignKeyConstraint, ReferenceDescriptor, ReferenceTargetKey, Schema, SchemaBuilder,
48    SchemaColumn, SchemaConstraint, SchemaConstraintKind, MAX_CONSTRAINT_NAME_BYTES,
49};
50pub use schema_descriptor::{
51    canonical_fingerprint, ColumnDescriptor, ConstraintDefinition, ConstraintDescriptor,
52    DataTypeDescriptor, DatabaseDescriptor, DescriptorEnvelope, DescriptorError, DescriptorKind,
53    ForeignKeyActionDescriptor, IndexDescriptor, ResultColumnDescriptor, TableDescriptor,
54    ViewDescriptor, SCHEMA_DESCRIPTOR_VERSION,
55};
56pub use smart_string::SmartString;
57pub use string_map::{StringMap, StringSet};
58pub use types::{
59    DataType, ExternalTypeRef, ForeignKeyAction, IndexEntry, IndexType, IsolationLevel,
60    LogicalTypeRef, Operator,
61};
62pub use unicode::{canonical_unicode_lowercase_nfc, canonical_unicode_nfc};
63pub use value::{parse_timestamp, ExternalValueRef, Value, NULL_VALUE};
64
65/// Hash map for canonical values with randomized hashing.
66pub type ValueMap<V> = ahash::AHashMap<Value, V>;
67
68/// Hash set for canonical values with randomized hashing.
69pub type ValueSet = ahash::AHashSet<Value>;