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 timezone;
24pub mod types;
25pub mod unicode;
26pub mod value;
27pub mod vector;
28
29#[doc(hidden)]
30pub use checksum::{crc32_ieee, derive_plugin_object_identity_bytes, sha256_digest};
31pub use compact_arc::{CompactArc, CompactArcDrop};
32pub use compact_vec::CompactVec;
33pub use cow_btree::CowBTree;
34pub use error::{Error, ErrorCategory, ErrorCode, ErrorContext, NavigationErrorCode, Result};
35pub use form_descriptor::{
36    EditorKind, FormFieldDescriptor, ReferenceSelector, TableFormDescriptor,
37};
38pub use i64_map::{I64Map, I64Set};
39#[doc(hidden)]
40pub use identity::new_durable_identity_bytes;
41pub use identity::{SchemaColumnId, SchemaTableId};
42pub use params::ParamVec;
43pub use row::{Row, RowColumnRef, RowIter, RowIterMut, RowSchema};
44pub use row_vec::{RowIdVec, RowVec};
45#[doc(hidden)]
46pub use schema::generated_constraint_name;
47pub use schema::{
48    ForeignKeyConstraint, ReferenceDescriptor, ReferenceTargetKey, Schema, SchemaBuilder,
49    SchemaColumn, SchemaConstraint, SchemaConstraintKind, MAX_CONSTRAINT_NAME_BYTES,
50};
51pub use schema_descriptor::{
52    canonical_fingerprint, ColumnDescriptor, ConstraintDefinition, ConstraintDescriptor,
53    DataTypeDescriptor, DatabaseDescriptor, DescriptorEnvelope, DescriptorError, DescriptorKind,
54    ForeignKeyActionDescriptor, IndexDescriptor, ProcedureDescriptor, ResultColumnDescriptor,
55    RoutineArgumentDescriptor, RoutineArgumentModeDescriptor, RoutineResourcePolicyDescriptor,
56    RoutineResultColumnDescriptor, RoutineResultDescriptor, RoutineSecurityDescriptor,
57    RoutineVolatilityDescriptor, TableDescriptor, ViewDescriptor, SCHEMA_DESCRIPTOR_VERSION,
58};
59pub use smart_string::SmartString;
60pub use string_map::{StringMap, StringSet};
61pub use timezone::{parse_timestamp_with_explicit_offset, SessionTimeZone};
62pub use types::{
63    DataType, ExternalTypeRef, ForeignKeyAction, IndexEntry, IndexType, IsolationLevel,
64    LogicalTypeRef, Operator,
65};
66pub use unicode::{canonical_unicode_lowercase_nfc, canonical_unicode_nfc};
67pub use value::{parse_timestamp, ExternalValueRef, Value, NULL_VALUE};
68
69/// Hash map for canonical values with randomized hashing.
70pub type ValueMap<V> = ahash::AHashMap<Value, V>;
71
72/// Hash set for canonical values with randomized hashing.
73pub type ValueSet = ahash::AHashSet<Value>;