Expand description
Protocol-agnostic SQL primitives for Ubiquisync.
⚠ PRE-ALPHA — WORK IN PROGRESS ⚠
This crate is in active, early development. APIs are incomplete, unproven, and will change without notice. Do not use it in production. Breaking changes may land on any commit.
The sync engine is storage-agnostic: it builds SQL as strings and runs them through a backend connection. This crate holds the pieces of that story that know nothing about any particular data domain:
db— the backend abstraction (Db/DbBatch), the value/row types, and the genericDbTypestorage class.dialect— the closedSqlDialectenum capturing the points where SQL flavors diverge.hlc_storage— a SQL-backed implementation of the core HLC storage.
Data domains such as the table protocol (ubiquisync-tables) build on top
of these; concrete drivers (ubiquisync-sqlite, ubiquisync-postgres)
implement Db and report which SqlDialect
they speak.
Modules§
- db
- The SQL backend abstraction: values, rows, batches, and the
Dbtrait. - dialect
- SQL dialect: the points where SQL flavors genuinely diverge.
- hlc_
storage - SQL-backed
HlcStoragefor the hybrid logical clock. - processor
- The ingestion driver: applies one log entry atomically, and exposes the
stored log back as a
Replica. - reducer
- Op → SQL translation: the
Reducertrait a data domain implements to turn each of its ops into the backend writes that materialize it. - store
- SQL-backed
Storeadding ad-hoc read queries. - tracker
- Recording the log entries a processor ingests.
- util
- Small SQL string helpers shared across backends.