This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window){ | |
"use strict"; | |
var log = Math.log; | |
var LN2 = Math.LN2; | |
var clz32 = Math.clz32 || function(x) {return 31 - log(x >>> 0) / LN2 | 0}; | |
var fromCharCode = String.fromCharCode; | |
var Object_prototype_toString = ({}).toString; | |
var NativeSharedArrayBuffer = window["SharedArrayBuffer"]; | |
var sharedArrayBufferString = NativeSharedArrayBuffer ? Object_prototype_toString.call(NativeSharedArrayBuffer) : ""; | |
var NativeUint8Array = window.Uint8Array; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @since 1.0.0 | |
*/ | |
import * as Reactivity from "@effect/experimental/Reactivity" | |
import * as Client from "@effect/sql/SqlClient" | |
import type { Connection } from "@effect/sql/SqlConnection" | |
import { SqlError } from "@effect/sql/SqlError" | |
import type { Custom, Fragment, Primitive } from "@effect/sql/Statement" | |
import * as Statement from "@effect/sql/Statement" | |
import { PGlite, types, type Results, type Transaction } from "@electric-sql/pglite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ElectricSyncService extends Effect.Service<ElectricSyncService>()( | |
"ElectricSyncService", | |
{ | |
scoped: Effect.gen(function* () { | |
yield* Effect.logInfo(`creating ElectricSyncService`) | |
const clockService = yield* ClockService | |
const syncService = yield* SyncService | |
const config = yield* SynchrotronClientConfig | |
const pgLiteClient = yield* PgLiteSyncTag |
OlderNewer