@xtandard/entitlements/counters/drizzle
Drizzle counter store over a counter table you own (drizzle/*
*CountersTable() factories): atomic upserts on Postgres, MySQL and SQLite
(ADR 0004).
import { … } from "@xtandard/entitlements/counters/drizzle";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createDrizzleCounterStore |
Create a Drizzle-backed counter store. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
DrizzleCounterStore |
A Drizzle CounterStore with keys and an expired-row sweep. |
DrizzleCounterStoreOptions |
Options for createDrizzleCounterStore. |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
DrizzleCounterTable |
A table with the fixed columns the Drizzle counter store requires: key (primary key), value (double), applied (double — the amount the last operation on the row applied, returned atomically with the new value) and expiresAt (bigint unix ms, nullable). |