Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomas2d/knex-firebird-dialect
Firebird dialect for Knex.js
https://github.com/tomas2d/knex-firebird-dialect
database firebird firebird-sql knex knex-dialect knex-firebird node sql
Last synced: about 1 hour ago
JSON representation
Firebird dialect for Knex.js
- Host: GitHub
- URL: https://github.com/tomas2d/knex-firebird-dialect
- Owner: Tomas2D
- Created: 2021-08-04T10:34:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-20T00:39:05.000Z (7 days ago)
- Last Synced: 2024-12-22T06:35:10.088Z (5 days ago)
- Topics: database, firebird, firebird-sql, knex, knex-dialect, knex-firebird, node, sql
- Language: JavaScript
- Homepage:
- Size: 2.29 MB
- Stars: 25
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# 👾 knex-firebird-dialect
[![codecov](https://codecov.io/gh/Tomas2D/knex-firebird-dialect/branch/master/graph/badge.svg?token=SQA7VM6XIV)](https://codecov.io/gh/Tomas2D/knex-firebird-dialect)
This library serves as dialect (client) for [Knex.js](https://github.com/knex/knex) (A SQL query builder).
The purpose of doing this is to replace old unmaintained libraries; this one is based on [igorklopov/firebird-knex](https://github.com/igorklopov/firebird-knex).
Under the hood, there is a [node-firebird-driver-native](https://github.com/asfernandes/node-firebird-drivers/blob/master/packages/node-firebird-driver-native/).
In case you can't use the `node-firebird-driver-native` package, stick to version 1.x of this package which works on top of [node-firebird](https://github.com/hgourvest/node-firebird) package.Show some love and ⭐️ this project!
## 🚀 Usage
Start with installing the package with your favorite package manager.
```
yarn add knex-firebird-dialect node-firebird-driver-native
```or
```
npm install knex-firebird-dialect
```Snippet below shows basic setup.
```javascript
import knexLib from "knex";
import knexFirebirdDialect from "knex-firebird-dialect";const knexConfig = {
client: knexFirebirdDialect,
connection: {
host: "127.0.0.1",
port: 3050,
user: "SYSDBA",
password: "masterkey",
database: '/tmp/database.fdb',
lowercase_keys: true,
},
createDatabaseIfNotExists: true,
debug: false,
};
```**Notice**: if you using CommonJS require, do not forget to use the default import. `const knexFirebirdDialect = require("knex-firebird-dialect").default`;
For more look at the `tests` folder.