1.0.2 • Published 10 months ago

@hoangducnhuan/knex-atlas-sql v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@hoangducnhuan/knex-atlas-sql

Atlas Sql 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 @hoangducnhuan/knex-atlas-sql

Usage

import { knex } from "knex";
import ClientAtlasSqlOdbc from "@hoangducnhuan/knex-atlas-sql";

const instance = knex({
  client: ClientAtlasSqlOdbc,
  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

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago