Skip to main content

linkrs_api/
api_core.rs

1//! API Core Layer – Business logic that is independent of the transport layer
2//!
3//! It provides core functions such as query execution, transaction management, and Schema operations.
4//! It is reused by the embedded layer and the network service layer.
5
6pub mod bulk_insert;
7pub mod cost_profile;
8pub mod error;
9pub mod query_api;
10pub(crate) mod query_api_builder;
11#[cfg(any(feature = "fulltext", feature = "vector"))]
12pub mod rebuild_source;
13pub mod schema_api;
14pub mod session_command;
15pub mod sync_api;
16pub mod transaction_api;
17pub mod types;
18#[cfg(feature = "vector")]
19pub mod vector_api;
20
21pub use bulk_insert::{
22    BulkInsertConfig, BulkInsertError, BulkInsertItem, BulkInsertItemType, BulkInsertOperation,
23    BulkInsertOperationBuilder, BulkInsertResult,
24};
25pub use cost_profile::{cost_config_for_profile, resolve_space_cost_configs};
26pub use error::{CoreError, CoreResult, ExtendedErrorCode};
27pub use query_api::QueryApi;
28pub use schema_api::SchemaApi;
29pub use session_command::{
30    classify_session_command, is_command_like, CommandParseError, SessionCommand,
31};
32pub use sync_api::SyncApi;
33pub use transaction_api::TransactionApi;
34pub use types::*;
35#[cfg(feature = "vector")]
36pub use vector_api::{VectorApi, VectorSearchResult};
37
38// Re-export the statistical types from the metrics layer.
39pub use linkrs_metrics::{
40    ErrorInfo, ErrorSummary, ErrorType, MetricType, MetricValue, QueryMetrics, QueryPhase,
41    QueryProfile, QueryStatus, StatsManager,
42};