Skip to content
pgxsinkit
Search
Ctrl
K
Cancel
GitHub
Select theme
Dark
Light
Auto
Start here
What is pgxsinkit?
Getting started
Deploying the server
Operating in production
Use these docs with your AI assistant
Core concepts
Overview
The two paths
The write path
The read path
The Electric subquery requirement
Timestamps
Local schema & DDL parity
Registry entry options
Worker mode
Export & restore
Local store lifecycle
Mutation status
The event lane
Packages
Overview
OPFS-repacked PGlite
Demo & harness
Overview
Board on the cloud
Hosted /demo
Storage benchmarks
API reference
Overview
@pgxsinkit/contracts
Classes
StorageDeclarationRefusedError
Interfaces
CanonicalColumn
CanonicalReadContract
CanonicalRowFilter
CanonicalTable
ClientProjectionSpec
DeferrableConstraintSpec
EventStreamEntry
EventStreamIdentityField
ManagedFieldSpec
MutationDiagnostics
MutationSummary
PrimaryKeySpec
ProjectedTableColumn
RegistryChange
RegistryDiff
RegistryInvariantCell
RegistryInvariantSpec
RegistryLock
RenderedPolicy
ResolvedManagedFieldSpecForTable
ResolvedStorageDeclaration
RowFilterShape
RowFilterSpec
RowTransformContext
ServerProjectionSpec
ShapeSpec
SyncColumnType
SyncConfigInput
SyncRegistryDefinition
SyncRuntimeStatus
SyncServerAddress
SyncStateViewProjection
SyncStorageDeclaration
SyncTableEntry
TableGovernanceSpec
TableSpecInput
Type Aliases
ApplyStrategy
AuthoritativeWriteRequest
BatchEventAck
BatchEventError
BatchEventRequest
BatchMutationAck
BatchMutationError
BatchMutationRequest
ClientProjectionSpecForTable
ConflictPolicy
DeferrableConstraintSpecForTable
EntityKey
EventAck
EventAckStatus
EventEnvelope
EventQueueMessage
EventStreamPayload
EventStreamRegistry
GrantScopeAccess
GrantScopeAccessOptions
GrantScopeBypassOptions
GrantScopeClaimOptions
JwtClaims
ManagedFieldApplyOn
ManagedFieldSpecForTable
ManagedFieldStrategy
MutationAck
MutationAckStatus
MutationEnvelope
MutationKind
MutationRejection
MutationStatus
OwnerOrAdminAccess
OwnerOrAdminAccessOptions
RegistryChangeSeverity
RegistryEventStreams
RegistryRelations
RegistryRowClasses
RegistryTables
RegistryViews
Retention
RowFilterInput
RowTransform
ShapeSpecInput
ShapeSpecInputFor
StampedEvent
StorageBackend
StorageDurability
SubscriptionTiming
SupabaseGrantScopeNativePoliciesOptions
SupabaseGrantScopePredicateColumns
SupabaseMembershipNativePoliciesOptions
SupabaseMembershipPredicateColumns
SupabaseMembershipShapeColumns
SupabaseMembershipWriteGateColumns
SupabaseOwnerOrAdminNativePoliciesOptions
SupabaseOwnerOrAdminPredicateOptions
SyncRuntimePhase
SyncTableCreateInput
SyncTableInput
SyncTableInputGovernance
SyncTableInputProjection
SyncTableName
SyncTableRecord
SyncTableRegistry
SyncTableUpdateInput
TableColumnKey
TableGovernanceSpecForTable
TableMode
WriteMode
Variables
authoritativeWriteRequestSchema
batchEventAckSchema
batchEventErrorSchema
batchEventPaths
batchEventRequestSchema
batchMutationAckSchema
batchMutationErrorSchema
batchMutationRequestSchema
CLOCK_US_CALL_SQL_TEXT
clockMicrosecondsSql
CONFLICT_POLICIES
CONVERGENCE_EVENTS
DENY_ALL
entityKeySchema
EVENT_STREAM_NAME_MAX_LENGTH
EVENT_STREAM_NAME_PATTERN
EVENT_STREAM_QUEUE_PREFIX
eventAckSchema
eventAckStatusSchema
eventEnvelopeSchema
eventQueueMessageSchema
jwtClaimsSchema
MAX_EVENT_PAYLOAD_BYTES
MAX_EVENT_REQUEST_BYTES
MAX_EVENTS_PER_BATCH
mutationAckSchema
mutationAckStatusSchema
mutationEnvelopeSchema
mutationKindSchema
mutationRejectionSchema
mutationStatusSchema
NOW_MICROSECONDS_SQL_TEXT
RETENTIONS
stampedEventSchema
STORAGE_BACKENDS
STORAGE_DURABILITIES
SUBSCRIPTION_TIMINGS
supabaseOwnerOrAdminDefaults
syncRegistryRowClassesSymbol
syncRegistrySchemaSymbol
syncRegistryStorageSymbol
syncRegistryStreamsSymbol
unixMicrosecondsSchema
WRITE_MODES
Functions
asEphemeral
asReadonly
assertReadContractPreserved
assertRegistryInvariant
assertStorageDeclarationCompatible
attachSyncRegistryRowClasses
attachSyncRegistrySchema
attachSyncRegistryStorage
attachSyncRegistryStreams
buildGrantScopeAccessShapeWhere
buildGrantScopeShapeWhere
buildMembershipShapeWhere
buildOverlayResolutionBarrier
buildOwnerOrAdminShapeWhere
buildOwnershipShapeWhere
buildRegistryLock
buildRoleGuardedStatement
buildRowFilterShape
buildSupabaseGrantScopeNativePolicies
buildSupabaseMembershipNativePolicies
buildSupabaseOwnerOrAdminNativePolicies
buildSupabaseOwnerOrAdminPredicateSqlText
buildSyncStateView
c
canonicalizeReadContract
canonicalizeRegistry
canonicalReadContractString
canonicalRegistryString
classifyApplyStrategy
classifyTableApplyStrategy
compareRegistries
defineEventStream
defineReadProjection
defineSyncRegistry
defineSyncTable
deriveSyncColumnTypes
diffCanonicalRegistries
diffRegistryAgainstLock
escapeSqlLiteral
fingerprintReadContract
fingerprintRegistry
getLocalSyncedTablePrimaryKeyColumns
getLocalSyncPrimaryKey
getLocalSyncPrimaryKeyColumns
getOmittedProjectedColumnNames
getOmittedProjectedColumns
getProjectedColumnNames
getProjectedColumns
getSyncRegistryRowClasses
getSyncRegistrySchema
getSyncRegistryStorage
getSyncRegistryStreams
hashString
hasNonStrictObjectRoot
isClaimsDependentRowFilter
isConflictPolicy
isManagedFieldGuarded
isRetention
isStorageBackend
isStorageDurability
isSubscriptionTiming
isWriteMode
isZodSchema
maybeQuoteIdentifier
normalizeCastPositionType
quoteIdentifier
quoteSqlLiteral
registryEventStreams
registryRowClasses
resolveGrantScopeAccess
resolveGrantScopeIds
resolveOwnerOrAdminAccess
resolveServerVersionColumnName
resolveStorageDeclaration
runRegistryCheck
summarizeRegistryDiff
withRetention
@pgxsinkit/pglite-opfs-repacked
Classes
CorruptStoreError
DurabilityModeMismatchError
ExtentSizeMismatchError
FsError
OpfsRepackedFS
StoreClosedError
StoreFailedError
StoreLimitError
StoreOwnedError
StoreRecreationRequiredError
UnexpectedStoreEntryError
Interfaces
CreateOpfsRepackedPGliteOptions
Type Aliases
OpfsRepackedPGlite
RepackedDurability
Functions
createOpfsRepackedPGlite
@pgxsinkit/client
Classes
ClientDisposedError
CommittedStoreUnreachableError
DataExportDrainError
ElectedEngineUnconstructibleError
EngineRelocatedError
EventPayloadInvalidError
EventPayloadTooLargeError
EventStreamsNotRegisteredError
ExecutionLimitMismatchError
InvalidStorePathError
LazyRelationNotActivatedError
LifecycleBusyError
LiveRowsMaterializer
NonPersistentStoreError
ProvisionExpiredError
RestoreTargetExistsError
StoreDestroyRefusedError
UnknownEventStreamError
WriteNotReadyError
Interfaces
AttachAckPayload
AttachPayload
AttachSyncClientOptions
AuthTokenSnapshot
BootReport
BridgeCodec
BridgeEnvelope
BridgePort
CloneDumpPhases
CloneDumpResult
CommittedStoreUnreachableWire
ConvergenceClient
ConvergenceDriver
ConvergenceDriverOptions
ConvergenceTrigger
CreateClientPGliteOptions
CreateSyncClientOptions
DataExportDeps
DataExportOptions
DataExportReport
DataExportResult
DefineSyncWorkerOptions
DiagnosticDumpReport
DiagnosticExportDeps
DiagnosticExportOptions
DiagnosticExportResult
DrainJournalOptions
DrizzleQueryBuilder
ElectedEngineWorker
EventAppendResult
EventBackoffOptions
EventFlushDriver
EventFlushDriverOptions
EventFlushGate
EventLaneBackoffTransition
EventLaneDb
EventLaneOptions
EventLaneReport
EventLaneRuntime
EventLaneVerdict
EventStreamFlushOptions
ExecutionLimitConfig
ExportArtefactWire
ExportReportCommon
FreshBootResolution
GuardedRawQuerySpec
LazyGuardIndex
LifecycleSlot
LiveDiffPayload
LiveDiffState
LiveInitialPayload
LiveQueryDiagnostics
LiveRowsSubscription
LocalStoreVersionEvent
MutationDetail
MutationDiagnostics
MutationListOptions
MutationListSubscription
MutationsApi
MutationsApiDeps
MutationSummary
MutationSummarySubscription
OpfsEffects
OpfsEffectsDeps
OutboxStatus
PgliteBootAssets
PreparedQueryResult
PrepareQueryInput
ProvisionAckPayload
ProvisionPayload
RawQueryOptions
ReplInspectionSurface
ResolveStoreBootOptions
RpcPayload
RpcResultPayload
SetOnlinePayload
StoreBackupReport
StoreBootResolution
StoreDestructionRetryOptions
StoreExportDeps
StoreExportOptions
StoreExportResult
StoreWorkerQuiesceOptions
StoreWorkerQuiesceOutcome
SubscribeLiveRowsInput
SubscribePayload
SyncClient
SyncClientTableHandle
SyncTransaction
SyncTransactionResult
SyncTransactionTableHandle
SyncWorkerHost
TokenRequestPayload
TokenResponsePayload
WakePayload
WorkerTokenCache
Type Aliases
AllMutationsView
AttachedSyncClient
BridgeEvent
BridgeMessageType
BridgeTransferable
ClientPGlite
DrainJournalOption
EngineRelocatedOutcome
ExportReport
GuardedQueryFn
JournalTable
LocalMetaTable
MutationBatchItem
MutationKind
MutationSummaryDetail
OutboxTable
OverlayTable
ReadModelView
ResolvedStorageBackend
RpcOp
SyncStateView
Variables
BRIDGE_CHANNEL
BRIDGE_PROTOCOL_VERSION
COMMITTED_STORE_UNREACHABLE_CODE
DEFAULT_DRAIN_TIMEOUT_MS
DEFAULT_EVENT_BACKOFF_BASE_MS
DEFAULT_EVENT_BACKOFF_CEILING_MS
DEFAULT_EVENT_BATCH_SIZE
DEFAULT_EVENT_FLUSH_INTERVAL_MS
ENGINE_RELOCATED_CODE
identityCodec
OUTBOX_SEQUENCE
OUTBOX_TABLE
Functions
assertLazyRefsActivated
attachSyncClient
buildLazyGuardIndex
buildRegistryReadHandles
classifyEventBatchFailure
committedStoreUnreachableFromWire
computeEventBackoffMs
computeLiveDiff
createBrowserConvergenceTrigger
createClientPGlite
createConvergenceDriver
createEventFlushDriver
createEventLaneRuntime
createIntervalConvergenceTrigger
createLifecycleSlot
createMutationsApi
createOpfsEffects
createSyncClient
createWorkerTokenCache
defineSyncWorker
deriveBatchEventUrl
deriveStoreId
destroyStoreArtifacts
encodeEnvelope
findReferencedLazyKeysInSql
findReferencedSyncedKeysInSql
generateLocalSchemaSql
getAllMutationsView
getJournalTable
getLocalMetaTable
getOutboxTable
getOverlayTable
getReadModelView
getSyncedLocalTable
getSyncStateView
instrumentShapeFetch
isBridgeEnvelope
parseRetryAfterMs
performDatadirDump
performDataExport
performDiagnosticExport
performStoreExport
postBridgeMessage
provisionSyncWorker
quiesceStoreWorker
replAdapter
resolveBatchEventUrl
resolveStoreBoot
resolveStoreDataDir
rowKey
runFreshCommitmentBarrier
runThrowawayCloneDump
seedLiveDiffState
setSyncDebugSink
storeIndexedDbDatabaseName
storeTargetExists
syncDebug
timeAsync
wrapEngineWorker
wrapLiveQueryForMaterialization
@pgxsinkit/server
Classes
FetchRouter
MalformedEventQueueMessageError
Interfaces
ApplyFunctionRenderOptions
CorsConfig
CreateEventIngestHandlerOptions
CreatePgmqEventQueueOptions
CreateSyncServerOptions
DeadLetteredEventMessage
DefineEventConsumerOptions
DeliveredEventMessage
DeploymentProfile
ElectricProxyOptions
EventConsumer
EventConsumerBatch
EventConsumerPollOptions
EventDeadLetterReport
EventDrainOptions
EventDrainSummary
EventGateInput
EventIngestDb
EventQueue
EventQueueExecutor
EventQueueReadOptions
EventsEnqueuedInfo
ServerDiagnostics
SyncServer
Type Aliases
CorsScope
EventConsumerCallback
EventConsumerSleep
EventGate
EventGateDecision
EventQueueReceipt
EventsEnqueuedHook
FetchHandler
IdentityResolution
OperationsLogStartupMode
RouterErrorHandler
StartupVerificationMode
Variables
authoritativeMutationPaths
batchMutationPaths
DEFAULT_EVENT_CONSUMER_BATCH_SIZE
DEFAULT_EVENT_DRAIN_BUDGET_MS
DEFAULT_EVENT_MAX_ATTEMPTS
DEFAULT_EVENT_POLL_CEILING_MS
DEFAULT_EVENT_POLL_FACTOR
DEFAULT_EVENT_POLL_FLOOR_MS
DEFAULT_EVENT_VISIBILITY_TIMEOUT_SECONDS
EVENT_LANE_FINGERPRINT_PREFIX
EVENT_QUEUE_UNAVAILABLE_RETRY_AFTER_SECONDS
operationsLogTable
PGMQ_DEAD_LETTER_KEY
Functions
assertEventQueueReceipts
buildPlpgsqlBatchFunctionDdl
buildRegistrySchema
computeEventPollWaitMs
createEventIngestHandler
createMutationHandler
createPgmqEventQueue
createSyncServer
defineEventConsumer
ensureOperationsLogSchema
eventIngestRequiresClaims
eventLaneDdlFingerprint
eventLaneStreamNames
eventStreamQueueName
expectedApplyFingerprint
operationsLogRegclassTarget
proxyElectricShapeRequest
readSqlState
renderEventLaneMigration
renderPgxsinkitUtilitiesMigration
resolveEventIdentity
@pgxsinkit/react
Functions
createSyncClientHooks
Design decisions
Overview
Project
Overview
GitHub
Select theme
Dark
Light
Auto
BRIDGE_PROTOCOL_VERSION
const
BRIDGE_PROTOCOL_VERSION
:
1
Defined in: packages/client/src/worker/protocol.ts:17