A database adapter for Feathers.js that provides a service wrapper around KnexJS, a SQL query builder supporting PostgreSQL, MySQL, SQLite3, MSSQL, MariaDB, and Oracle. Current stable version 8.0.1. This package implements the Feathers Common database adapter API and querying syntax, offering features like pagination, multi-record operations, custom events, and parameterized queries. It requires both `knex` and the corresponding database driver. Released under the Feathers ecosystem, it follows semantic versioning and is actively maintained.
npm install feathers-knexNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Feathers app with a Knex-backed messages service using SQLite.
Use Node >= 12 and switch to ES module imports or use dynamic import for CJS projects.
Refactor code to use `service.find({ query: { ... } })` directly.Set `multi: true` in the service options to allow batch creation.
Add `'$search'` to the `whitelist` array in service options.
Use `import knex from 'knex';` (default import) instead of `import { knex } from 'knex';`.Run `npm install knex` in your project.
Create the table using `db.schema.createTable('messages', ...)` before using the service.Use `import service from 'feathers-knex';` or `const service = require('feathers-knex');`.