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 mod rpc_stdio;
38pub mod runtime;
39pub mod serde_json;
40pub mod server;
41pub mod service_cli;
42mod service_router;
43pub mod sqlstate;
44pub mod storage;
45pub mod telemetry;
46pub mod utils;
47pub mod wire;
48
49/// Re-export of the shared `reddb-wire` crate.
50///
51/// `reddb-wire` is the transport-agnostic protocol vocabulary
52/// (connection-string parser today, RedWire frames in a follow-up
53/// slice). Exposed here so existing `use reddb::…` callers can
54/// reach the parser without a separate dependency.
55pub use reddb_wire as wire_proto;
56
57pub mod prelude {
58    pub use crate::api::{
59        Capability, CapabilitySet, CatalogService, CatalogSnapshot, CollectionStats, DataOps,
60        QueryPlanner, RedDBError, RedDBOptions, RedDBResult, SchemaManifest, StorageMode,
61        DEFAULT_EXPORT_RETENTION, DEFAULT_SNAPSHOT_RETENTION, REDDB_FORMAT_VERSION,
62        REDDB_PROTOCOL_VERSION,
63    };
64    pub use crate::application::{
65        AdminUseCases, CatalogUseCases, EntityUseCases, GraphUseCases, NativeUseCases,
66        QueryUseCases, RuntimeAdminPort, RuntimeCatalogPort, RuntimeEntityPort, RuntimeGraphPort,
67        RuntimeNativePort, RuntimeQueryPort, RuntimeSchemaPort, SchemaUseCases,
68    };
69    pub use crate::auth::store::AuthStore;
70    pub use crate::auth::{AuthConfig, AuthError, Role as AuthRole};
71    pub use crate::catalog::{
72        snapshot_store, CatalogModelSnapshot, CollectionDescriptor, CollectionModel, SchemaMode,
73    };
74    pub use crate::engine::{EngineInfo, EngineStats, RedDBEngine};
75    pub use crate::grpc::{GrpcServerOptions, GrpcTlsOptions, RedDBGrpcServer};
76    pub use crate::health::{HealthIssue, HealthProvider, HealthReport, HealthState};
77    pub use crate::index::{
78        IndexCatalog, IndexCatalogSnapshot, IndexConfig, IndexKind, IndexMetric, IndexRuntime,
79        IndexStats,
80    };
81    pub use crate::physical::{
82        ArtifactState, BlockReference, CompactionPolicy, ExportDescriptor, GridLayout,
83        ManifestEvent, ManifestEventKind, ManifestPointers, PhysicalAnalyticsJob,
84        PhysicalGraphProjection, PhysicalIndexState, PhysicalLayout, PhysicalMetadataFile,
85        SnapshotDescriptor, SuperblockHeader, WalPolicy, DEFAULT_MANIFEST_EVENT_HISTORY,
86        PHYSICAL_METADATA_PROTOCOL_VERSION,
87    };
88    pub use crate::runtime::{
89        ConnectionPoolConfig, RedDBRuntime, RuntimeConnection, RuntimeFilter, RuntimeFilterValue,
90        RuntimeGraphCentralityAlgorithm, RuntimeGraphCentralityResult, RuntimeGraphCentralityScore,
91        RuntimeGraphClusteringResult, RuntimeGraphCommunity, RuntimeGraphCommunityAlgorithm,
92        RuntimeGraphCommunityResult, RuntimeGraphComponent, RuntimeGraphComponentsMode,
93        RuntimeGraphComponentsResult, RuntimeGraphCyclesResult, RuntimeGraphDegreeScore,
94        RuntimeGraphDirection, RuntimeGraphEdge, RuntimeGraphHitsResult,
95        RuntimeGraphNeighborhoodResult, RuntimeGraphNode, RuntimeGraphPath,
96        RuntimeGraphPathAlgorithm, RuntimeGraphPathResult, RuntimeGraphPattern,
97        RuntimeGraphProjection, RuntimeGraphTopologicalSortResult, RuntimeGraphTraversalResult,
98        RuntimeGraphTraversalStrategy, RuntimeGraphVisit, RuntimeIvfMatch, RuntimeIvfSearchResult,
99        RuntimeQueryResult, RuntimeQueryWeights, RuntimeStats, ScanCursor, ScanPage,
100    };
101    pub use crate::server::{RedDBServer, ServerOptions, ServerReplicationState};
102}
103
104pub use crate::api::{
105    Capability, CapabilitySet, CatalogService, CatalogSnapshot, CollectionStats, DataOps,
106    QueryPlanner, RedDBError, RedDBOptions, RedDBResult, SchemaManifest, StorageMode,
107    DEFAULT_EXPORT_RETENTION, DEFAULT_SNAPSHOT_RETENTION, REDDB_FORMAT_VERSION,
108    REDDB_PROTOCOL_VERSION,
109};
110pub use crate::application::{
111    AdminUseCases, CatalogUseCases, EntityUseCases, GraphUseCases, NativeUseCases, QueryUseCases,
112    RuntimeAdminPort, RuntimeCatalogPort, RuntimeEntityPort, RuntimeGraphPort, RuntimeNativePort,
113    RuntimeQueryPort, RuntimeSchemaPort, SchemaUseCases,
114};
115pub use crate::catalog::{
116    snapshot_store, CatalogModelSnapshot, CollectionDescriptor, CollectionModel, SchemaMode,
117};
118pub use crate::engine::{EngineInfo, EngineStats, RedDBEngine};
119pub use crate::grpc::{GrpcServerOptions, GrpcTlsOptions, RedDBGrpcServer};
120pub use crate::health::{HealthIssue, HealthProvider, HealthReport, HealthState};
121pub use crate::index::{
122    IndexCatalog, IndexCatalogSnapshot, IndexConfig, IndexKind, IndexMetric, IndexRuntime,
123    IndexStats,
124};
125pub use crate::physical::{
126    ArtifactState, BlockReference, CompactionPolicy, ExportDescriptor, GridLayout, ManifestEvent,
127    ManifestEventKind, ManifestPointers, PhysicalAnalyticsJob, PhysicalGraphProjection,
128    PhysicalIndexState, PhysicalLayout, PhysicalMetadataFile, SnapshotDescriptor, SuperblockHeader,
129    WalPolicy, DEFAULT_MANIFEST_EVENT_HISTORY, PHYSICAL_METADATA_PROTOCOL_VERSION,
130};
131pub use crate::replication::{ReplicationConfig, ReplicationRole};
132pub use crate::runtime::{
133    ConnectionPoolConfig, RedDBRuntime, RuntimeConnection, RuntimeFilter, RuntimeFilterValue,
134    RuntimeGraphCentralityAlgorithm, RuntimeGraphCentralityResult, RuntimeGraphCentralityScore,
135    RuntimeGraphClusteringResult, RuntimeGraphCommunity, RuntimeGraphCommunityAlgorithm,
136    RuntimeGraphCommunityResult, RuntimeGraphComponent, RuntimeGraphComponentsMode,
137    RuntimeGraphComponentsResult, RuntimeGraphCyclesResult, RuntimeGraphDegreeScore,
138    RuntimeGraphDirection, RuntimeGraphEdge, RuntimeGraphHitsResult,
139    RuntimeGraphNeighborhoodResult, RuntimeGraphNode, RuntimeGraphPath, RuntimeGraphPathAlgorithm,
140    RuntimeGraphPathResult, RuntimeGraphPattern, RuntimeGraphProjection,
141    RuntimeGraphTopologicalSortResult, RuntimeGraphTraversalResult, RuntimeGraphTraversalStrategy,
142    RuntimeGraphVisit, RuntimeIvfMatch, RuntimeIvfSearchResult, RuntimeQueryResult,
143    RuntimeQueryWeights, RuntimeStats, ScanCursor, ScanPage,
144};
145pub use crate::server::{RedDBServer, ServerOptions, ServerReplicationState};
146
147pub use crate::storage::*;