API reference@evolu/common › local‑first/Storage

Encrypted storage layer for local-first data.

Functions

FunctionDescription
createBaseSqliteStorageCreates a BaseSqliteStorage implementation.
createBaseSqliteStorageTables-
getOwnerUsageRetrieves usage information for an owner from the evolu_usage table.
getTimestampByIndex-
getTimestampInsertStrategyDetermines the insertion strategy for a timestamp based on its position relative to the current first and last timestamps.
testCreateCrdtMessageTest helper for creating a simple CrdtMessage.
timestampBytesToFingerprint-
updateOwnerUsageUpdates timestamp bounds in evolu_usage table.

Interfaces

InterfaceDescription
BaseRange-
BaseSqliteStorageCommon interface for both client and relay SQLite storages.
BaseSqliteStorageDep-
CrdtMessageA CRDT message combining a unique Timestamp with a DbChange.
DbChangeA DbChange is a change to a table row. Together with a unique Timestamp, it forms a CrdtMessage.
EncryptedCrdtMessageAn encrypted CrdtMessage.
FingerprintRange-
SkipRange-
StorageEvolu Storage.
StorageConfig-
StorageDep-
StorageQuotaErrorError when storage or billing quota is exceeded.
TimestampsRange-
ValidDbChangeValuesError-

Type Aliases

Type AliasDescription
DbChangeValues-
EncryptedDbChangeEncrypted DbChange
FingerprintA cryptographic hash used for efficiently comparing collections of TimestampByteses.
InfiniteUpperBound-
Range-
RangeType-
RangeUpperBoundUnion type for Range's upperBound: either a TimestampBytes or InfiniteUpperBound.
SqliteStorageDeps-
StorageInsertTimestampStrategy-
ValidDbChangeValues-

Variables

VariableDescription
DbChangeA DbChange is a change to a table row. Together with a unique Timestamp, it forms a CrdtMessage.
DbChangeValues-
fingerprintSize-
InfiniteUpperBound-
RangeType-
ValidDbChangeValues-
zeroFingerprintA fingerprint of an empty range.