#![recursion_limit = "256"]
#![cfg_attr(not(test), allow(dead_code, unused_imports))]
#![cfg_attr(
test,
allow(
clippy::cast_possible_truncation,
clippy::cloned_ref_to_slice_refs,
clippy::large_futures,
clippy::redundant_clone,
clippy::suspicious_operation_groupings,
clippy::useless_vec
)
)]
pub const SERVER_PROTOCOL_VERSION: u32 = 11;
#[cfg(not(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2")))]
pub const CURRENT_STORAGE_FORMAT_VERSION: u32 = init::CURRENT_FORMAT_VERSION;
#[cfg(not(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2")))]
pub const SYNC_PROTOCOL_VERSION: u32 = sync::SYNC_PROTOCOL_VERSION;
#[cfg(not(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2")))]
pub use sql2::script::{SqlScriptPlan, SqlScriptStatement, parse_sql_script};
extern crate self as lix;
pub mod plugin;
#[cfg(not(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2")))]
macro_rules! engine_surface {
($($item:item)*) => {
$($item)*
};
}
#[cfg(not(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2")))]
engine_surface! {
pub(crate) mod account;
mod binary_cas;
pub(crate) mod branch;
mod background_task;
mod authority_client;
pub(crate) mod catalog;
#[cfg(feature = "storage-benches")]
pub mod changelog;
#[cfg(not(feature = "storage-benches"))]
pub(crate) mod changelog;
pub(crate) mod checkpoint;
pub(crate) mod collection_generation;
pub(crate) mod columnar_row_group;
pub(crate) mod commit_graph;
mod common;
pub(crate) mod compression;
pub(crate) mod domain;
mod engine;
pub(crate) mod row_columnar;
pub(crate) mod row_pk;
pub(crate) mod row_payload;
pub(crate) mod row_state;
pub(crate) mod row_ref;
pub(crate) mod filesystem;
pub(crate) mod functions;
pub(crate) mod gc;
mod handle;
#[cfg(test)]
mod hot_index_aging_probe;
#[cfg(test)]
mod hot_row_tombstone_probe;
#[cfg(all(test, feature = "storage-benches"))]
mod json_predicate_pushdown_probe;
pub(crate) mod hot_state;
pub(crate) mod init;
pub mod migration;
mod open_types;
#[cfg(test)]
mod module_layers;
pub(crate) mod observe_coordinator;
pub(crate) mod observe_invalidation;
pub(crate) mod order_preserving_key;
#[cfg(any(test, feature = "storage-benches"))]
pub mod registered_spaces;
mod schema;
pub mod snapshot;
#[cfg(any(feature = "server-protocol", feature = "server-protocol-client"))]
pub mod server_protocol;
#[cfg(not(any(feature = "server-protocol", feature = "server-protocol-client")))]
mod server_protocol;
mod session;
#[doc(hidden)]
mod sync;
pub use sync::{SyncFailure, SyncHealth, SyncHealthState, SyncPhase};
pub(crate) mod sql2;
#[cfg(feature = "storage-benches")]
mod sql_profile;
mod sql_telemetry;
pub mod storage;
#[cfg(feature = "storage-benches")]
pub mod storage_adapter;
#[cfg(not(feature = "storage-benches"))]
pub(crate) mod storage_adapter;
#[cfg(feature = "storage-benches")]
pub mod storage_bench;
pub(crate) mod storage_codec;
pub(crate) mod storage_spaces;
pub mod telemetry;
#[cfg(any(test, feature = "storage-benches"))]
pub(crate) mod test_support;
#[cfg(feature = "storage-benches")]
pub mod tracked_state;
#[cfg(not(feature = "storage-benches"))]
pub(crate) mod tracked_state;
#[cfg(feature = "storage-benches")]
pub mod transaction;
#[cfg(not(feature = "storage-benches"))]
pub(crate) mod transaction;
pub(crate) mod transaction_types;
pub(crate) mod undo_redo;
pub mod wasm;
#[cfg(feature = "default_wasm_runtime")]
#[doc(hidden)]
pub use plugin::runtime::default::runtime as default_wasm_runtime;
mod lifecycle;
pub use lifecycle::{create_lix, delete_lix, CreateLixBuilder, DeleteLixBuilder, HostedLix};
pub use handle::{
Durability,
CallbackOpenProgressSink, ExecuteBatchBuilder, ExecuteBuilder, Lix, LixTransaction,
ObserveEvents, OpenAnotherSessionBuilder, OpenLixBuilder, OpenLixFromSnapshotBuilder,
ServerOptions, TransactionExecuteBuilder, UnconfiguredOpenLixBuilder, RemoteOpenLixBuilder,
RemoteLix, RemoteExecuteBuilder, RemoteLixTransaction, RemoteObserveEvents,
RemoteOpenAnotherSessionBuilder, RemoteTransactionExecuteBuilder, RemoteExecuteBatchBuilder, open_lix,
};
pub use open_types::{
OpenMigrationReport, OpenPhase, OpenProgress, OpenProgressSink, OpenReport,
};
#[cfg(target_family = "wasm")]
#[doc(hidden)]
pub use sync::{
BROWSER_TRANSPORT_CONFIG_HEADER, register_browser_sync_transport,
unregister_browser_sync_transport,
};
pub use telemetry::bind_session;
pub use schema::{
lix_schema_definition, lix_schema_definition_json, validate_lix_schema,
validate_lix_schema_definition,
};
pub use lix_schema as schema_v1;
pub use common::LixError;
pub use common::{
Blob, Json, LixNotice, NullableKeyFilter, ResultColumnType, RowRef, SharedStr, SqlQueryResult,
Value,
};
pub use common::{BranchId, CanonicalPluginKey, CanonicalSchemaKey, FileId};
pub use common::{LixPath, validate_lix_path_segment};
pub use common::{WireQueryResult, WireValue};
pub(crate) use common::{parse_row_metadata_value, serialize_row_metadata};
pub use session::{
CreateBranchOptions, CreateBranchReceipt, MergeBranchOptions,
MergeBranchOutcome, MergeBranchPreview, MergeBranchPreviewOptions, MergeBranchReceipt,
MergeChangeStats, RedoReceipt, SessionTransaction, SwitchBranchOptions, SwitchBranchReceipt, UndoReceipt,
};
pub use session::{
CommitReceipt, CommitSpan, ExecuteBatchResult, ExecuteBatchStatement, ExecuteResult, ObserveEvent, ResultRowRef, Row,
TryFromValue,
};
#[doc(hidden)]
pub use session::CoherentReadBatch;
pub(crate) use session::{
ExecuteIdempotency, ExecuteStatementMetadata, ExecutionDisposition, FileRead,
FileUploadProgress,
};
#[cfg(feature = "server-protocol")]
pub(crate) use session::VerifiedRequestBlob;
#[cfg(feature = "storage-benches")]
pub(crate) use sql_profile::SqlReadProfile;
#[cfg(any(feature = "offline-migration", test))]
pub use migration::upgrade_authority_for_partial_sync;
#[cfg(any(feature = "offline-migration", test))]
pub use handle::{convert_replica_to_partial, retry_replica_migration_cleanup};
pub use storage::Memory;
pub use sync::{
ReplicaRecoveryBlob, ReplicaRecoveryBranch, ReplicaRecoveryExport, ReplicaRecoveryFile,
ReplicaRecoveryReceipt, ReplicaRecoveryRow, ReplicaRecoverySource,
};
pub const GLOBAL_BRANCH_ID: &str = "ffffffff-ffff-7fff-bfff-ffffffffffff";
pub const SYSTEM_ACCOUNT_ID: &str = "00000000-0000-7000-8000-000000000001";
pub const ANONYMOUS_ACCOUNT_ID: &str = "00000000-0000-7000-8000-000000000002";
#[cfg(test)]
#[macro_use]
#[path = "../tests/integration/support/mod.rs"]
mod support;
#[cfg(test)]
#[path = "../tests/integration/main.rs"]
mod integration_tests;
#[cfg(test)]
mod native_partial_sql_tests;
#[cfg(test)]
mod native_partial_bootstrap_tests;
}