Skip to main content

reddb_server/
lib.rs

1#![allow(dead_code, unused_imports, unused_variables)]
2// Structural lints we accept for API design reasons:
3#![allow(
4    clippy::too_many_arguments,   // complex DB operations legitimately need many params
5    clippy::type_complexity,      // internal types with nested generics
6    clippy::result_large_err,     // tonic::Status is 176 bytes, can't box it
7    clippy::should_implement_trait, // from_str() returns Option, not Result — different semantics
8    clippy::new_without_default,  // some constructors have side effects
9    clippy::enum_variant_names,   // JoinPhase variants all end in Start by design
10    clippy::wrong_self_convention, // to_bytes on Copy types in our serialization
11    clippy::len_without_is_empty  // segment structs don't need is_empty
12)]
13
14pub mod ai;
15pub mod api;
16pub mod application;
17pub mod auth;
18pub mod catalog;
19pub mod cli;
20pub mod config;
21pub mod crypto;
22pub mod ec;
23pub mod engine;
24pub mod geo;
25pub mod grpc;
26pub mod health;
27pub mod index;
28pub mod json;
29pub mod json_field;
30pub mod log;
31pub mod mcp;
32pub mod modules;
33pub mod physical;
34pub(crate) mod presentation;
35pub mod regress;
36pub mod replication;
37pub(crate) mod reserved_fields;
38pub mod rpc_stdio;
39pub mod runtime;
40pub mod serde_json;
41pub mod server;
42pub mod service_cli;
43mod service_router;
44pub mod sqlstate;
45pub mod storage;
46pub mod telemetry;
47pub mod utils;
48pub mod wire;
49
50/// Re-export of the shared `reddb-wire` crate.
51///
52/// `reddb-wire` is the transport-agnostic protocol vocabulary
53/// (connection-string parser today, RedWire frames in a follow-up
54/// slice). Exposed here so existing `use reddb::…` callers can
55/// reach the parser without a separate dependency.
56pub use reddb_wire as wire_proto;
57
58pub mod prelude {
59    pub use crate::api::{
60        Capability, CapabilitySet, CatalogService, CatalogSnapshot, CollectionStats, DataOps,
61        QueryPlanner, RedDBError, RedDBOptions, RedDBResult, SchemaManifest, StorageMode,
62        DEFAULT_EXPORT_RETENTION, DEFAULT_SNAPSHOT_RETENTION, REDDB_FORMAT_VERSION,
63        REDDB_PROTOCOL_VERSION,
64    };
65    pub use crate::application::{
66        AdminUseCases, CatalogUseCases, EntityUseCases, GraphUseCases, NativeUseCases,
67        QueryUseCases, RuntimeAdminPort, RuntimeCatalogPort, RuntimeEntityPort, RuntimeGraphPort,
68        RuntimeNativePort, RuntimeQueryPort, RuntimeSchemaPort, SchemaUseCases,
69    };
70    pub use crate::auth::store::AuthStore;
71    pub use crate::auth::{AuthConfig, AuthError, Role as AuthRole};
72    pub use crate::catalog::{
73        snapshot_store, CatalogModelSnapshot, CollectionDescriptor, CollectionModel, SchemaMode,
74    };
75    pub use crate::engine::{EngineInfo, EngineStats, RedDBEngine};
76    pub use crate::grpc::{GrpcServerOptions, GrpcTlsOptions, RedDBGrpcServer};
77    pub use crate::health::{HealthIssue, HealthProvider, HealthReport, HealthState};
78    pub use crate::index::{
79        IndexCatalog, IndexCatalogSnapshot, IndexConfig, IndexKind, IndexMetric, IndexRuntime,
80        IndexStats,
81    };
82    pub use crate::physical::{
83        ArtifactState, BlockReference, CompactionPolicy, ExportDescriptor, GridLayout,
84        ManifestEvent, ManifestEventKind, ManifestPointers, PhysicalAnalyticsJob,
85        PhysicalGraphProjection, PhysicalIndexState, PhysicalLayout, PhysicalMetadataFile,
86        SnapshotDescriptor, SuperblockHeader, WalPolicy, DEFAULT_MANIFEST_EVENT_HISTORY,
87        PHYSICAL_METADATA_PROTOCOL_VERSION,
88    };
89    pub use crate::runtime::{
90        ConnectionPoolConfig, RedDBRuntime, RuntimeConnection, RuntimeFilter, RuntimeFilterValue,
91        RuntimeGraphCentralityAlgorithm, RuntimeGraphCentralityResult, RuntimeGraphCentralityScore,
92        RuntimeGraphClusteringResult, RuntimeGraphCommunity, RuntimeGraphCommunityAlgorithm,
93        RuntimeGraphCommunityResult, RuntimeGraphComponent, RuntimeGraphComponentsMode,
94        RuntimeGraphComponentsResult, RuntimeGraphCyclesResult, RuntimeGraphDegreeScore,
95        RuntimeGraphDirection, RuntimeGraphEdge, RuntimeGraphHitsResult,
96        RuntimeGraphNeighborhoodResult, RuntimeGraphNode, RuntimeGraphPath,
97        RuntimeGraphPathAlgorithm, RuntimeGraphPathResult, RuntimeGraphPattern,
98        RuntimeGraphProjection, RuntimeGraphTopologicalSortResult, RuntimeGraphTraversalResult,
99        RuntimeGraphTraversalStrategy, RuntimeGraphVisit, RuntimeIvfMatch, RuntimeIvfSearchResult,
100        RuntimeQueryResult, RuntimeQueryWeights, RuntimeStats, ScanCursor, ScanPage,
101    };
102    pub use crate::server::{RedDBServer, ServerOptions, ServerReplicationState};
103}
104
105pub use crate::api::{
106    Capability, CapabilitySet, CatalogService, CatalogSnapshot, CollectionStats, DataOps,
107    QueryPlanner, RedDBError, RedDBOptions, RedDBResult, SchemaManifest, StorageMode,
108    DEFAULT_EXPORT_RETENTION, DEFAULT_SNAPSHOT_RETENTION, REDDB_FORMAT_VERSION,
109    REDDB_PROTOCOL_VERSION,
110};
111pub use crate::application::{
112    AdminUseCases, CatalogUseCases, EntityUseCases, GraphUseCases, NativeUseCases, QueryUseCases,
113    RuntimeAdminPort, RuntimeCatalogPort, RuntimeEntityPort, RuntimeGraphPort, RuntimeNativePort,
114    RuntimeQueryPort, RuntimeSchemaPort, SchemaUseCases,
115};
116pub use crate::catalog::{
117    snapshot_store, CatalogModelSnapshot, CollectionDescriptor, CollectionModel, SchemaMode,
118};
119pub use crate::engine::{EngineInfo, EngineStats, RedDBEngine};
120pub use crate::grpc::{GrpcServerOptions, GrpcTlsOptions, RedDBGrpcServer};
121pub use crate::health::{HealthIssue, HealthProvider, HealthReport, HealthState};
122pub use crate::index::{
123    IndexCatalog, IndexCatalogSnapshot, IndexConfig, IndexKind, IndexMetric, IndexRuntime,
124    IndexStats,
125};
126pub use crate::physical::{
127    ArtifactState, BlockReference, CompactionPolicy, ExportDescriptor, GridLayout, ManifestEvent,
128    ManifestEventKind, ManifestPointers, PhysicalAnalyticsJob, PhysicalGraphProjection,
129    PhysicalIndexState, PhysicalLayout, PhysicalMetadataFile, SnapshotDescriptor, SuperblockHeader,
130    WalPolicy, DEFAULT_MANIFEST_EVENT_HISTORY, PHYSICAL_METADATA_PROTOCOL_VERSION,
131};
132pub use crate::replication::{ReplicationConfig, ReplicationRole};
133pub use crate::runtime::{
134    ConnectionPoolConfig, RedDBRuntime, RuntimeConnection, RuntimeFilter, RuntimeFilterValue,
135    RuntimeGraphCentralityAlgorithm, RuntimeGraphCentralityResult, RuntimeGraphCentralityScore,
136    RuntimeGraphClusteringResult, RuntimeGraphCommunity, RuntimeGraphCommunityAlgorithm,
137    RuntimeGraphCommunityResult, RuntimeGraphComponent, RuntimeGraphComponentsMode,
138    RuntimeGraphComponentsResult, RuntimeGraphCyclesResult, RuntimeGraphDegreeScore,
139    RuntimeGraphDirection, RuntimeGraphEdge, RuntimeGraphHitsResult,
140    RuntimeGraphNeighborhoodResult, RuntimeGraphNode, RuntimeGraphPath, RuntimeGraphPathAlgorithm,
141    RuntimeGraphPathResult, RuntimeGraphPattern, RuntimeGraphProjection,
142    RuntimeGraphTopologicalSortResult, RuntimeGraphTraversalResult, RuntimeGraphTraversalStrategy,
143    RuntimeGraphVisit, RuntimeIvfMatch, RuntimeIvfSearchResult, RuntimeQueryResult,
144    RuntimeQueryWeights, RuntimeStats, ScanCursor, ScanPage,
145};
146pub use crate::server::{RedDBServer, ServerOptions, ServerReplicationState};
147
148pub use crate::storage::*;