Skip to main content

CREATE_SIDECAR_SQL

Constant CREATE_SIDECAR_SQL 

Source
pub const CREATE_SIDECAR_SQL: &str = "
CREATE TABLE IF NOT EXISTS _pylon_crdt_snapshots (
    entity     TEXT NOT NULL,
    row_id     TEXT NOT NULL,
    snapshot   BLOB NOT NULL,
    updated_at TEXT NOT NULL,
    PRIMARY KEY (entity, row_id)
)
";
Expand description

SQL to create the snapshot sidecar. Idempotent. Called by Runtime constructor for any database where CRDT mode could be in use (always, since crdt: true is the default).