docs: update portal for WRNexusJS 0.8.0

This commit is contained in:
2026-08-02 23:57:41 +05:30
parent 9366895f78
commit 8d5d4b8f12
183 changed files with 14433 additions and 2492 deletions
+135 -16
View File
@@ -10,11 +10,13 @@ page wrnexusdb {
<header class="topbar">
<a class="brand" href="/"><span>W</span> WRNexusJS</a>
<nav aria-label="Primary"><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="https://component.wrnexusjs.dev/">Components</a><a href="/language">Language</a><a href="/architecture">Architecture</a></nav>
<div class="topbar-actions"><a class="preview-pill" href="/access">Private preview · v0.7.0</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme" title="Toggle color theme">◐</button></div>
<div class="topbar-actions"><a class="preview-pill" href="/access">Private preview · v0.8.0</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme" title="Toggle color theme">◐</button></div>
</header>
<div class="mobile-doc-nav"><details><summary>Browse documentation</summary><nav><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="https://component.wrnexusjs.dev/">Components</a><a href="/language">Language</a><a href="/architecture">Architecture</a><a href="/tutorial">Tutorial</a><a href="/guides/project-structure">Guides</a><a href="/examples">Examples</a><a href="/search">Search</a></nav></details></div>
<main class="portal-main docs-layout">
<article id="main" class="documentation prose standalone package-document"><nav class="breadcrumbs" aria-label="Breadcrumb"><a href="/">Home</a><span>/</span><a href="/packages">Packages</a><span>/</span><span aria-current="page">@wrnexus/db</span></nav><section class="doc-intro"><span class="eyebrow">Data · Package reference</span><h1>@wrnexus/db</h1><p>Database adapters, typed queries, models, migrations, and sessions.</p><div class="doc-meta"><span>v0.7.0</span><span>Private registry</span><span>Data</span></div><section id="access" class="access-callout"><h2>Install the package</h2><p>After WorkRoot approves private registry access, install the release-aligned package:</p><pre><code>bun add @wrnexus/db@0.7.0</code><button type="button" class="copy-button" aria-label="Copy installation command">Copy</button></pre><p><a href="/access">Request preview access</a>. Never put registry tokens in source control.</p></section></section><section id="guide"><blockquote>The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based <code>Db</code> client, migrations, and a sqlc-style query generator.</blockquote>
<article id="main" class="documentation prose standalone package-document"><nav class="breadcrumbs" aria-label="Breadcrumb"><a href="/">Home</a><span>/</span><a href="/packages">Packages</a><span>/</span><span aria-current="page">@wrnexus/db</span></nav><section class="doc-intro"><span class="eyebrow">Data · Package reference</span><h1>@wrnexus/db</h1><p>Database adapters, typed queries, models, migrations, and sessions.</p><div class="doc-meta"><span>v0.8.0</span><span>Private registry</span><span>Data</span></div><section id="access" class="access-callout"><h2>Install the package</h2><p>After WorkRoot approves private registry access, install the release-aligned package:</p><pre><code>bun add @wrnexus/db@0.8.0</code><button type="button" class="copy-button" aria-label="Copy installation command">Copy</button></pre><p><a href="/access">Request preview access</a>. Never put registry tokens in source control.</p></section></section><section id="guide"><h3 id="rollout-safe-migrations">Rollout-safe migrations</h3>
<p>Run <code>wrnexus db check</code> in CI before deployment. The analyzer reports stable diagnostics for drops, renames, type changes, new/enforced required columns, and potentially blocking index creation, with an expand/backfill/switch/contract recommendation. <code>wrnexus db migrate</code> blocks critical issues in pending migrations. <code>--allow-breaking</code> is an explicit operator override; already-applied migrations do not block later releases.</p>
<blockquote>The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based <code>Db</code> client, migrations, and a sqlc-style query generator.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/db</code> is the server-side data layer. You describe tables as TypeScript models (the <code>v</code> column builder + <code>table()</code>); those models drive migrations, coerce raw DB rows into typed objects, and feed the query generator. A thin <code>Driver</code> interface is implemented by adapters for SQLite (<code>bun:sqlite</code>), Postgres/MySQL (<code>Bun.SQL</code>), and MongoDB. The <code>Db</code> client adds ergonomics — model-mapped <code>all</code>/<code>one</code>, transactions, <code>createTable</code>, pagination, and batched relation loading. A process-wide registry (<code>getDb</code>/<code>setDb</code>) exposes configured connections to pages and API routes. Reach for it whenever a WRNexusJS app needs persistence.</p>
@@ -50,7 +52,8 @@ const users = table(&quot;users&quot;, &#123;
<li><code>exec(sql, params?)</code> — <code>Promise&lt;ExecResult&gt;</code> (<code>&#123; changes, lastInsertId? &#125;</code>).</li>
<li><code>tx(fn)</code> — run <code>fn(db)</code> in a transaction; rolls back on throw. Nested <code>tx</code> reuses the current transaction.</li>
<li><code>createTable(model)</code> — runs the model's <code>CREATE TABLE IF NOT EXISTS</code> DDL.</li>
<li><code>close()</code>.</li>
<li><code>close()</code> — idempotently rejects new top-level work, drains active queries and</li>
<p>transactions, then closes the underlying pool.</p>
</ul>
<p>Every query is parameterized (positional params). <code>createTableSql(model, dialect, ifNotExists?)</code> renders <code>CREATE TABLE</code> directly; <code>Dialect</code> is <code>&quot;sqlite&quot; | &quot;postgres&quot; | &quot;mysql&quot;</code>.</p>
<h4 id="client-registry-getdb-setdb">Client registry — <code>getDb</code> / <code>setDb</code></h4>
@@ -59,7 +62,8 @@ const users = table(&quot;users&quot;, &#123;
<li><code>setDb(db)</code> / <code>setDb(name, db)</code> — set the default or a named connection.</li>
<li><code>registerDb(name, db)</code> — alias of <code>setDb(name, db)</code>.</li>
<li><code>getDb(name = &quot;default&quot;)</code> — the default or a named <code>Db</code> (throws if unconfigured).</li>
<li><code>hasDb(name?)</code>, <code>databaseNames()</code>, <code>closeDatabases()</code>.</li>
<li><code>hasDb(name?)</code>, <code>databaseNames()</code>, <code>closeDatabases()</code>. Registry shutdown clears</li>
<p>registrations first, attempts every open database, and reports close failures together with <code>AggregateError</code> instead of leaking later pools.</p>
</ul>
<pre data-language="ts"><code>const users = await getDb().all(&quot;SELECT * FROM users&quot;);
const events = await getDb(&quot;analytics&quot;).all(&quot;SELECT * FROM hits&quot;);</code></pre>
@@ -76,8 +80,8 @@ const events = await getDb(&quot;analytics&quot;).all(&quot;SELECT * FROM hits&q
<li><code>parseMigration(name, content)</code> → <code>Migration</code> (<code>&#123; name, up, down &#125;</code>).</li>
<li><code>loadMigrations(dir)</code> — parse all <code>.sql</code> files, sorted by filename.</li>
<li><code>appliedMigrations(db)</code> — applied names, oldest first.</li>
<li><code>migrate(db, dir)</code> — apply all pending (each in a transaction); returns applied names.</li>
<li><code>rollback(db, dir)</code> — roll back the most recent; returns its name or <code>null</code>.</li>
<li><code>migrate(db, dir, options?)</code> — apply all pending (each in a transaction); returns applied names.</li>
<li><code>rollback(db, dir, options?)</code> — roll back the most recent; returns its name or <code>null</code>.</li>
<li><code>status(db, dir)</code> — <code>&#123; name, applied &#125;[]</code> for every migration file.</li>
<li><code>scaffoldMigration(dir, name, dialect, models?)</code> — write a new numbered migration; with <code>models</code> it generates <code>CREATE</code>/<code>DROP</code> for every table (referenced tables first via topological sort). Returns the file path.</li>
</ul>
@@ -132,6 +136,12 @@ const pageTwo = await paginate(
&#123; sql: &quot;SELECT * FROM users ORDER BY id&quot;, model: users &#125;,
&#123; page: 2 &#125;,
);</code></pre>
<p>For deployments, <code>&#123; dryRun: true &#125;</code> reports pending names without applying their SQL, <code>signal</code> cancels safely between migrations, and the default database-backed lock prevents concurrent deploy runners. A live lock produces <code>WRN-DB-MIGRATION-LOCKED</code>; crash-stale locks expire after <code>lockTimeoutMs</code> (five minutes by default). Disable it with <code>lock: false</code> only when an external deploy coordinator already guarantees exclusivity.</p>
<pre data-language="ts"><code>const pending = await migrate(db, &quot;app/db/migrations&quot;, &#123; dryRun: true &#125;);
await migrate(db, &quot;app/db/migrations&quot;, &#123;
signal: shutdownController.signal,
lockTimeoutMs: 10 * 60_000,
&#125;);</code></pre>
<p>MongoDB (document API):</p>
<pre data-language="ts"><code>import &#123; mongo &#125; from &quot;@wrnexus/db/mongo&quot;;
@@ -149,10 +159,39 @@ const active = await repo.find(&#123; active: true &#125;);</code></pre>
<p><code>SessionBackend</code>; <code>getDb</code>/<code>setDb</code> are wired by the WRNexusJS runtime from <code>wrnexus.config.ts</code>.</p>
<li>The <code>mongodb</code> npm package is an optional, lazily-imported peer — install it</li>
<p>only if you use <code>@wrnexus/db/mongo</code>. The core package stays dependency-free.</p>
</ul></section><section id="api" class="api"><h2>Complete TypeScript API</h2><p>Generated from the exact installed package declarations.</p><pre data-language="typescript"><code>import &#123; M as Model &#125; from './schema-tVurYsbL.js';
</ul>
<h3 id="repository-and-transaction-helpers">Repository and transaction helpers</h3>
<p>Repositories accept an immutable equality <code>scope</code>, normally <code>&#123; column: &quot;tenant_id&quot;, value: ctx.tenant.id &#125;</code>. The scope is injected into every read, count, update and delete, while create overwrites any caller-supplied tenant value. This makes accidental cross-tenant CRUD through the repository API fail closed.</p>
<pre data-language="ts"><code>import &#123; createRepository, retryTransaction, databaseHealth, batch &#125; from &quot;@wrnexus/db&quot;;
const users = createRepository&lt;User&gt;(db, &#123;
table: &quot;users&quot;,
allowedColumns: [&quot;email&quot;, &quot;name&quot;, &quot;active&quot;],
&#125;);
const user = await users.require(42);
await users.update(42, &#123; active: true &#125;);</code></pre>
<p>Repository identifiers are validated, writes may be restricted to an allowlist, and values always use query parameters. Infrastructure packages remain helper-only and do not add UI dependencies to server code.</p>
<h3 id="0-8-repository-and-transaction-helpers">0.8 repository and transaction helpers</h3>
<pre data-language="ts"><code>import &#123; createRepository, databaseHealth, firstOrThrow, retryTransaction &#125; from &quot;@wrnexus/db&quot;;
const usersRepo = createRepository&lt;User&gt;(db, &#123;
table: &quot;users&quot;,
allowedColumns: [&quot;email&quot;, &quot;name&quot;, &quot;active&quot;],
maxListLimit: 250,
&#125;);
const users = await usersRepo.all(&#123;
orderBy: &quot;name&quot;,
direction: &quot;asc&quot;,
limit: 50,
offset: 0,
&#125;);</code></pre>
<p>Repository SQL identifiers are validated and values remain parameterized. Placeholder generation is dialect-aware: PostgreSQL uses <code>$1</code>, <code>$2</code>, and SQLite/MySQL use <code>?</code>. List limits are bounded.</p>
<p><code>retryTransaction()</code> retries recognized serialization, deadlock, and database-lock errors by default. Supply <code>shouldRetry</code> for application-specific retryable errors; ordinary validation or business errors are not retried automatically.</p></section><section id="api" class="api"><h2>Complete TypeScript API</h2><p>Generated from the exact installed package declarations.</p><pre data-language="typescript"><code>import &#123; M as Model &#125; from './schema-tVurYsbL.js';
export &#123; B as BaseType, C as Column, a as ColumnDef, b as Columns, t as table, v &#125; from './schema-tVurYsbL.js';
import &#123; a as Db, b as Dialect, R as Row &#125; from './driver-DA53QHkO.js';
export &#123; D as Driver, E as ExecResult, T as TxHandle, c as createDb, d as createTableSql &#125; from './driver-DA53QHkO.js';
import &#123; a as Db, b as Dialect, R as Row, E as ExecResult &#125; from './driver-DA53QHkO.js';
export &#123; D as Driver, T as TxHandle, c as createDb, d as createTableSql &#125; from './driver-DA53QHkO.js';
/**
* A process-wide database registry. The framework configures it at server
@@ -200,6 +239,16 @@ interface Migration &#123;
up: string;
down: string;
&#125;
interface MigrationRunOptions &#123;
/** Return pending migration names without executing their SQL. */
dryRun?: boolean;
/** Stop safely between migrations. Active database statements cannot be interrupted portably. */
signal?: AbortSignal;
/** Coordinate migration runners through the database. Default true. */
lock?: boolean;
/** Allow recovery of a lock left by a crashed process. Default 5 minutes. */
lockTimeoutMs?: number;
&#125;
/** Split a migration file into its `up` and `down` SQL sections. */
declare function parseMigration(name: string, content: string): Migration;
/** Load and parse all migration files in a directory, sorted by filename. */
@@ -207,11 +256,13 @@ declare function loadMigrations(dir: string): Migration[];
/** Names of already-applied migrations, oldest first. */
declare function appliedMigrations(db: Db): Promise&lt;string[]&gt;;
/** Apply an ordered migration list (each in a transaction). Returns applied names. */
declare function applyMigrations(db: Db, migrations: readonly Migration[]): Promise&lt;string[]&gt;;
declare function applyMigrations(db: Db, migrations: readonly Migration[], options?: MigrationRunOptions): Promise&lt;string[]&gt;;
/** Apply all pending migrations from a directory. */
declare function migrate(db: Db, dir: string): Promise&lt;string[]&gt;;
declare function migrate(db: Db, dir: string, options?: MigrationRunOptions): Promise&lt;string[]&gt;;
/** Roll back the most recently applied migration. Returns its name, or null. */
declare function rollback(db: Db, dir: string): Promise&lt;string | null&gt;;
declare function rollback(db: Db, dir: string, options?: Omit&lt;MigrationRunOptions, &quot;dryRun&quot;&gt; &amp; &#123;
dryRun?: boolean;
&#125;): Promise&lt;string | null&gt;;
/** Full status: every migration file with whether it has been applied. */
declare function status(db: Db, dir: string): Promise&lt;&#123;
name: string;
@@ -224,6 +275,16 @@ declare function status(db: Db, dir: string): Promise&lt;&#123;
*/
declare function scaffoldMigration(dir: string, name: string, dialect: Dialect, models?: Model[]): string;
interface MigrationSafetyIssue &#123;
code: &quot;WRN-DB-DROP-TABLE&quot; | &quot;WRN-DB-DROP-COLUMN&quot; | &quot;WRN-DB-RENAME&quot; | &quot;WRN-DB-TYPE-CHANGE&quot; | &quot;WRN-DB-SET-NOT-NULL&quot; | &quot;WRN-DB-ADD-REQUIRED&quot; | &quot;WRN-DB-BLOCKING-INDEX&quot;;
severity: &quot;error&quot; | &quot;warning&quot;;
migration: string;
statement: string;
recommendation: string;
&#125;
declare function analyzeMigrationSafety(migration: Migration): MigrationSafetyIssue[];
declare function analyzeMigrations(migrations: readonly Migration[]): MigrationSafetyIssue[];
/**
* sqlc-style query generator. Annotated SQL in `app/db/queries/*.sql` becomes
* typed TS functions whose params + results are inferred from the TS models and
@@ -366,10 +427,64 @@ interface QueryPolicy &#123;
onQuery?: (record: QueryRecord) =&gt; void | Promise&lt;void&gt;;
onIssue?: (issue: QueryIssue) =&gt; void | Promise&lt;void&gt;;
&#125;
declare function getDbPerformanceSnapshot(): &#123;
queries: QueryRecord[];
issues: QueryIssue[];
&#125;;
declare function resetDbPerformanceSnapshot(): void;
declare function instrumentDb(db: Db, policy?: QueryPolicy): Db;
declare function queryOperation(sql: string): string;
export &#123; type CursorPage, type CursorPageOptions, Db, Dialect, type Migration, Model, type ModelRef, type PageOptions, type Paginated, type QueryDef, type QueryIssue, type QueryKind, type QueryPolicy, type QueryRecord, type RelationOptions, Row, appliedMigrations, applyMigrations, closeDatabases, cursorPaginate, databaseNames, generateQueriesFile, getDb, hasDb, instrumentDb, loadMigrations, loadRelated, migrate, optimisticUpdate, paginate, parseMigration, parseQueries, queryOperation, registerDb, registerLazyDb, rollback, scaffoldMigration, setDb, softDeleteClause, status, tenantScope &#125;;
declare class RecordNotFoundError extends Error &#123;
constructor(message?: string);
&#125;
declare function firstOrThrow&lt;T&gt;(db: Db, sql: string, params?: unknown[], model?: Model&lt;T&gt;, message?: string): Promise&lt;T&gt;;
declare function exists(db: Db, sql: string, params?: unknown[]): Promise&lt;boolean&gt;;
declare function countRows(db: Db, table: string, where?: string, params?: unknown[]): Promise&lt;number&gt;;
declare function withTransaction&lt;T&gt;(db: Db, callback: (tx: Db) =&gt; Promise&lt;T&gt;): Promise&lt;T&gt;;
declare function retryTransaction&lt;T&gt;(db: Db, callback: (tx: Db, attempt: number) =&gt; Promise&lt;T&gt;, options?: &#123;
attempts?: number;
baseDelayMs?: number;
maxDelayMs?: number;
jitter?: boolean;
shouldRetry?: (error: unknown) =&gt; boolean;
&#125;): Promise&lt;T&gt;;
declare function batch&lt;T&gt;(values: readonly T[], size?: number): T[][];
declare function databaseHealth(db: Db): Promise&lt;&#123;
ok: boolean;
latencyMs: number;
error?: string;
&#125;&gt;;
interface RepositoryListOptions&lt;T extends Row&gt; &#123;
limit?: number;
offset?: number;
orderBy?: keyof T &amp; string;
direction?: &quot;asc&quot; | &quot;desc&quot;;
&#125;
interface Repository&lt;T extends Row&gt; &#123;
all(options?: RepositoryListOptions&lt;T&gt;): Promise&lt;T[]&gt;;
find(id: string | number): Promise&lt;T | null&gt;;
require(id: string | number): Promise&lt;T&gt;;
create(values: Partial&lt;T&gt;): Promise&lt;ExecResult&gt;;
update(id: string | number, values: Partial&lt;T&gt;): Promise&lt;ExecResult&gt;;
remove(id: string | number): Promise&lt;ExecResult&gt;;
exists(id: string | number): Promise&lt;boolean&gt;;
count(): Promise&lt;number&gt;;
&#125;
declare function createRepository&lt;T extends Row&gt;(db: Db, input: &#123;
table: string;
idColumn?: string;
model?: Model&lt;T&gt;;
allowedColumns?: readonly (keyof T &amp; string)[];
maxListLimit?: number;
/** Immutable equality scope (normally tenant_id) applied to every operation. */
scope?: &#123;
column: keyof T &amp; string;
value: unknown;
&#125;;
&#125;): Repository&lt;T&gt;;
export &#123; type CursorPage, type CursorPageOptions, Db, Dialect, ExecResult, type Migration, type MigrationRunOptions, type MigrationSafetyIssue, Model, type ModelRef, type PageOptions, type Paginated, type QueryDef, type QueryIssue, type QueryKind, type QueryPolicy, type QueryRecord, RecordNotFoundError, type RelationOptions, type Repository, Row, analyzeMigrationSafety, analyzeMigrations, appliedMigrations, applyMigrations, batch, closeDatabases, countRows, createRepository, cursorPaginate, databaseHealth, databaseNames, exists, firstOrThrow, generateQueriesFile, getDb, getDbPerformanceSnapshot, hasDb, instrumentDb, loadMigrations, loadRelated, migrate, optimisticUpdate, paginate, parseMigration, parseQueries, queryOperation, registerDb, registerLazyDb, resetDbPerformanceSnapshot, retryTransaction, rollback, scaffoldMigration, setDb, softDeleteClause, status, tenantScope, withTransaction &#125;;
</code></pre></section><section id="examples" class="examples"><h2>Examples</h2><p>Copy-ready examples from the installed package documentation.</p><div class="example-grid"><article class="example-card"><h3>Define models, connect, create tables, and query with typed results</h3><pre data-language="ts"><code>import &#123; v, table, createDb &#125; from &quot;@wrnexus/db&quot;;
import &#123; sqlite &#125; from &quot;@wrnexus/db/sqlite&quot;;
@@ -400,15 +515,19 @@ const pageTwo = await paginate(
db,
&#123; sql: &quot;SELECT * FROM users ORDER BY id&quot;, model: users &#125;,
&#123; page: 2 &#125;,
);</code></pre></article><article class="example-card"><h3>MongoDB (document API)</h3><pre data-language="ts"><code>import &#123; mongo &#125; from &quot;@wrnexus/db/mongo&quot;;
);</code></pre></article><article class="example-card"><h3>coordinator already guarantees exclusivity.</h3><pre data-language="ts"><code>const pending = await migrate(db, &quot;app/db/migrations&quot;, &#123; dryRun: true &#125;);
await migrate(db, &quot;app/db/migrations&quot;, &#123;
signal: shutdownController.signal,
lockTimeoutMs: 10 * 60_000,
&#125;);</code></pre></article><article class="example-card"><h3>MongoDB (document API)</h3><pre data-language="ts"><code>import &#123; mongo &#125; from &quot;@wrnexus/db/mongo&quot;;
const mdb = await mongo(process.env.MONGO_URL!, &quot;app&quot;);
const repo = mdb.collection(users);
await repo.insert(&#123; email: &quot;a@b.com&quot; &#125;);
const active = await repo.find(&#123; active: true &#125;);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#schema-v-table-column">Schema — v, table, Column</a><a class="toc-level-4" href="#driver-client-createdb-db-driver">Driver &amp; client — createDb, Db, Driver</a><a class="toc-level-4" href="#client-registry-getdb-setdb">Client registry — getDb / setDb</a><a class="toc-level-4" href="#adapters">Adapters</a><a class="toc-level-4" href="#migrations">Migrations</a><a class="toc-level-4" href="#query-generator-sqlc-style">Query generator (sqlc-style)</a><a class="toc-level-4" href="#query-helpers">Query helpers</a><a class="toc-level-4" href="#session-store">Session store</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#configuration">Configuration</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#rollout-safe-migrations">Rollout-safe migrations</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#schema-v-table-column">Schema — v, table, Column</a><a class="toc-level-4" href="#driver-client-createdb-db-driver">Driver &amp; client — createDb, Db, Driver</a><a class="toc-level-4" href="#client-registry-getdb-setdb">Client registry — getDb / setDb</a><a class="toc-level-4" href="#adapters">Adapters</a><a class="toc-level-4" href="#migrations">Migrations</a><a class="toc-level-4" href="#query-generator-sqlc-style">Query generator (sqlc-style)</a><a class="toc-level-4" href="#query-helpers">Query helpers</a><a class="toc-level-4" href="#session-store">Session store</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#configuration">Configuration</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-3" href="#repository-and-transaction-helpers">Repository and transaction helpers</a><a class="toc-level-3" href="#0-8-repository-and-transaction-helpers">0.8 repository and transaction helpers</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer><div class="footer-brand"><span class="footer-mark" aria-hidden="true">W</span><p><strong>WRNexusJS 0.7.0</strong><span>Complete API documentation generated from installed package declarations.</span></p></div><nav aria-label="Footer"><a href="/packages">All packages</a><a href="/getting-started">Get started</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav><p class="footer-meta">Private Developer Preview · Bun-native</p></footer>
<footer><div class="footer-brand"><span class="footer-mark" aria-hidden="true">W</span><p><strong>WRNexusJS 0.8.0</strong><span>Complete API documentation generated from installed package declarations.</span></p></div><nav aria-label="Footer"><a href="/packages">All packages</a><a href="/getting-started">Get started</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav><p class="footer-meta">Private Developer Preview · Bun-native</p></footer>
<BackToTop />
</div>
}