TLSyncStorageTransaction

See source code
Table of contents

Extends SynchronousStorage<R>.

Transaction interface for storage operations. Provides methods to read and modify documents, tombstones, and metadata within a transaction.

interface TLSyncStorageTransaction<R extends UnknownRecord>
  extends SynchronousStorage<R> {}

Methods

delete

Parameters

NameDescription

id

string

Returns

void

entries


get

Parameters

NameDescription

id

string

Returns

R | undefined

getChangesSince

Get all changes (document updates and deletions) since a given clock time. This is the main method for calculating diffs for client sync.

Parameters

NameDescription

sinceClock

number

The clock time to get changes since

Returns

Changes since the specified clock time


getClock

Get the current clock value. If the clock has incremented during the transaction, the incremented value will be returned.


getSchema


keys


set

Parameters

NameDescription

id

string

record

R

Returns

void

setSchema

Parameters

NameDescription

schema

Returns

void

values


Prev
TLSyncStorageOnChangeCallbackProps
Next
TLSyncStorageTransactionOptions