Catalog npm
PACKAGE EXPLORERView in registry

@000alen/knex-pglite

npm

PGlite Dialect for Knex

Versions collected2
Direct dependencies10From release 0.9.10
Last observed20 Oct, 21:53 UTC

README

Current package documentation

knex-pglite

NPM Version CI

PGlite Dialect for knex.js

Since PGlite is single user and only supports a single connection, this library doesn't allow users to configure the connection pool in the Knex.Config. Internally, the pool is set to { min: 1, max: 1 }, i.e. there is exactly one connection at a time.

Install

npm install knex-pglite

Usage

import { knex } from "@000alen/knex";
import ClientPgLite from "knex-pglite";

const instance = knex({
  client: ClientPgLite,
  dialect: "postgres",
  // Use an empty object to use an in memory db
  connection: {},
  // OR provide own PGLite instance
  // connection: { pglite: new PGLite() },
  // OR use the filesystem:
  // connection: { filename: 'path/to/my-pgdata' },
  // OR use indexdb:
  // connection: { connectionString: 'idb://my-pgdata' },
});

Acknowledgements

Mostly based on the build-in knex Postgres/Sqlite dialects.

License

MIT License

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 2

Collected releases
VersionPublishedDirect dependenciesOpen version
0.9.10Registry latest28 Nov 202410
0.9.928 Nov 202410

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
czeidler/knex-pglite

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:53 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:0124809e9490c5848ea47546c3d7f1663e83c80483c46f05e534aba7838fc243