discontinuedPackage electricsql has been discontinued.

SatelliteProcess class

Implemented types

Constructors

SatelliteProcess({required DbName dbName, required Client client, required SatelliteOpts opts, required DatabaseAdapter adapter, required Migrator migrator, required Notifier notifier})

Properties

adapter → DatabaseAdapter
no setteroverride
authState ↔ AuthState?
getter/setter pair
builder → QueryBuilder
final
client → Client
final
connectivityState ↔ ConnectivityState?
getter/setter pairoverride
connectRetryHandler ↔ ConnectRetryHandler
getter/setter pair
dbName → String
final
debugLsn → LSN?
no setter
hashCode → int
The hash code for this object.
no setterinherited
initializing ↔ Waiter?
getter/setter pair
maxSqlParameters ↔ int
To optimize inserting a lot of data when the subscription data comes, we need to do less INSERT queries, but SQLite/Postgres support only a limited amount of ?/$i positional arguments. Precisely, its either 999 for SQLite versions prior to 3.32.0 and 32766 for versions after, and 65535 for Postgres.
getter/setter pair
migrator → Migrator
final
notifier → Notifier
final
opts → SatelliteOpts
final
previousShapeSubscriptions → List<({String key, List<Shape> shapes})>
final
relations ↔ RelationsCache
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subscriptionManager ↔ ShapeManager
getter/setter pair
throttledSnapshot ↔ Throttle<DateTime>
latefinal

Methods

apply(List<OplogEntry> incoming, String incomingOrigin) → Future<ApplyIncomingResult>
applyTransaction(Transaction transaction) → Future<void>
authenticate(String token) → Future<void>
Authenticates with the Electric sync service using the provided token. @returns A promise that resolves to void if authentication succeeded. Otherwise, rejects with the reason for the error.
override
cancelConnectionWaiter(SatelliteException error) → void
checkMaxSqlParameters() → Future<void>
clearReplicationTransform(QualifiedTablename tableName) → void
override
clearTables(List<QualifiedTablename> tables) → Future<void>
clientDisconnect() → void
A disconnection issued by the client.
override
connectWithBackoff() → Future<void>
override
debugSetPerformSnapshot(Future<DateTime> fun()?) → void
Override the snapshot function for testing.
disconnect(SatelliteException? error) → void
override
garbageCollectOplog(DateTime commitTimestamp) → Future<void>
getEntries({int? since}) → Future<List<OplogEntry>>
getLocalRelations() → Future<RelationsCache>
getMeta<T>(String key) → Future<T>
hasToken() → bool
@returns True if a JWT token has been set previously. False otherwise.
override
maybeGarbageCollect(String origin, DateTime commitTimestamp) → Future<void>
mutexSnapshot() → Future<DateTime>
Perform a snapshot while taking out a mutex to avoid concurrent calls.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performSnapshot() → Future<DateTime>
setAuthState(AuthState newAuthState) → void
setClientListeners() → void
setMeta(String key, Object? value) → Future<void>
setReplicationTransform(QualifiedTablename tableName, ReplicatedRowTransformer<DbRecord> transform) → void
override
setToken(String token) → void
Sets the JWT token. @param token The JWT token.
override
start(AuthConfig? authConfig) → Future<void>
override
stop({bool? shutdown}) → Future<void>
override
subscribe(List<Shape> shapeDefinitions, [String? key]) → Future<ShapeSubscription>
Subscribe to a set of shapes, so that server data can get onto the client.
override
syncStatus(String key) → SyncStatus
Get information about a requested subscription by it's key
override
toString() → String
A string representation of this object.
inherited
unsubscribe(List<String> keys) → Future<void>
override
unsubscribeIds(List<String> subscriptionIds) → Future<void>
updateDatabaseAdapter(DatabaseAdapter newAdapter) → void
updateLsnStmt(LSN lsn) → Statement
Update this._lsn to the new value and generate a statement to persist this change
updateRelations(Relation rel) → Future<void>

Operators

operator ==(Object other) → bool
The equality operator.
inherited