Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rqlite/knex-rqlite
rqlite dialect for Knex.js
https://github.com/rqlite/knex-rqlite
database javascript knex rqlite sqlite typescript
Last synced: 5 days ago
JSON representation
rqlite dialect for Knex.js
- Host: GitHub
- URL: https://github.com/rqlite/knex-rqlite
- Owner: rqlite
- License: mit
- Created: 2020-02-24T17:29:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T12:13:27.000Z (5 months ago)
- Last Synced: 2024-09-18T13:15:56.831Z (about 2 months ago)
- Topics: database, javascript, knex, rqlite, sqlite, typescript
- Language: TypeScript
- Size: 2.64 MB
- Stars: 12
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# [knex-rqlite](https://github.com/rqlite/knex-rqlite)
[![](assets/badge.license.svg)](https://opensource.org/licenses/MIT)
[![](assets/badge.npm.svg)](https://www.npmjs.com/package/knex-rqlite)
![](assets/badge.coverage.svg)
[![](assets/badge.style.svg)](https://prettier.io/)Rqlite dialect for knex
---
## Usage
First install knex and knex-rqlite: `npm install knex rqlite-js knex-rqlite`
Then to use the driver like this:
```js
import Knex from "knex";
import { RqliteDialect, typeConfig } from "knex-rqlite";const knex = Knex({
client: RqliteDialect,
connection: typeConfig({
host: "localhost",
port: 4001,
}),
});
```## Credits
A special thanks goes to the team [@redaxle](https://github.com/redaxle), which implemented the compatibility between knex-rqlite and knex 2.0 ([#17](https://github.com/rqlite/knex-rqlite/pull/17))!
## Known problems
- This knex dialect **doesn't support transactions** yet
- Look into TODO.md to find a list of coming features## E2E tests
The tests can be run with `./scripts/test.js`
**This requires a running rqlite server on port 4001 and will drop&change the table rqliteDialect-e2e**
## Building
`./scripts/build`