Skip to main content
Home
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
41%
Published
a week ago (0.1.0)
interface ElectricCollectionConfig
extends Omit<BaseCollectionConfig<T, string | number, TSchema, ElectricCollectionUtils<T>, any>,
`onInsert`
| `onUpdate`
| `onDelete`
| `syncMode`
>

Configuration interface for Electric collection options

Type Parameters

T extends Row<unknown> = Row<unknown>
  • The type of items in the collection
TSchema extends StandardSchemaV1 = never
  • The schema type for validation

Properties

shapeOptions: ShapeStreamOptions<GetExtensions<T>>

Configuration options for the ElectricSQL ShapeStream

optional
syncMode: ElectricSyncMode
optional
[ELECTRIC_TEST_HOOKS]: ElectricTestHooks

Internal test hooks (for testing only) Hidden via Symbol to prevent accidental usage in production

optional
onInsert: (params: InsertMutationFnParams<T, string | number, ElectricCollectionUtils<T>>) => Promise<MatchingStrategy>

Optional asynchronous handler function called before an insert operation

optional
onUpdate: (params: UpdateMutationFnParams<T, string | number, ElectricCollectionUtils<T>>) => Promise<MatchingStrategy>

Optional asynchronous handler function called before an update operation

optional
onDelete: (params: DeleteMutationFnParams<T, string | number, ElectricCollectionUtils<T>>) => Promise<MatchingStrategy>

Optional asynchronous handler function called before a delete operation

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@vol1n/gel-electric-db-collections

Import symbol

import { type ElectricCollectionConfig } from "@vol1n/gel-electric-db-collections";
or

Import directly with a jsr specifier

import { type ElectricCollectionConfig } from "jsr:@vol1n/gel-electric-db-collections";

Add Package

pnpm i jsr:@vol1n/gel-electric-db-collections
or (using pnpm 10.8 or older)
pnpm dlx jsr add @vol1n/gel-electric-db-collections

Import symbol

import { type ElectricCollectionConfig } from "@vol1n/gel-electric-db-collections";

Add Package

yarn add jsr:@vol1n/gel-electric-db-collections
or (using Yarn 4.8 or older)
yarn dlx jsr add @vol1n/gel-electric-db-collections

Import symbol

import { type ElectricCollectionConfig } from "@vol1n/gel-electric-db-collections";

Add Package

vlt install jsr:@vol1n/gel-electric-db-collections

Import symbol

import { type ElectricCollectionConfig } from "@vol1n/gel-electric-db-collections";

Add Package

npx jsr add @vol1n/gel-electric-db-collections

Import symbol

import { type ElectricCollectionConfig } from "@vol1n/gel-electric-db-collections";

Add Package

bunx jsr add @vol1n/gel-electric-db-collections

Import symbol

import { type ElectricCollectionConfig } from "@vol1n/gel-electric-db-collections";