A query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use. (by knex)


Basic Knex repo stats
9 days ago

knex/knex is an open source project licensed under MIT License which is an OSI approved license.

Knex Alternatives

Similar projects and alternatives to Knex

  • GitHub repo Prisma

    Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server & SQLite

  • GitHub repo TypeORM

    ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

  • GitHub repo Directus

    Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.

  • GitHub repo Express

    Fast, unopinionated, minimalist web framework for node.

  • GitHub repo Nest

    A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8) 🚀

  • GitHub repo Sequelize

    An easy-to-use multi SQL dialect ORM tool for Node.js

  • GitHub repo prisma1

    💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB)

  • GitHub repo Objection.js

    An SQL-friendly ORM for Node.js

  • GitHub repo KeystoneJS

    The most powerful headless CMS for Node.js — built with GraphQL and React

  • GitHub repo MikroORM

    TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.

  • GitHub repo slonik

    A PostgreSQL client with strict types, detailed logging and assertions.

  • GitHub repo prisma-examples

    🚀 Ready-to-run Prisma example projects

  • GitHub repo docs

    📚 Prisma Documentation (by prisma)

  • GitHub repo axios

    Promise based HTTP client for the browser and node.js

  • GitHub repo PM2

    Node.js Production Process Manager with a built-in Load Balancer.

  • GitHub repo Koa

    Expressive middleware for node.js using ES2017 async functions

  • GitHub repo Mongoose

    MongoDB object modeling designed to work in an asynchronous environment.

  • GitHub repo sharp

    High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.

  • GitHub repo GreenSock-JS

    GreenSock's GSAP JavaScript animation library (including Draggable).

  • GitHub repo MongoDB

    The Official MongoDB Node.js Driver

NOTE: The number of mentions on this list indicates mentions on common posts. Hence, a higher number means a better Knex alternative or higher similarity.


Posts where Knex has been mentioned. We have used some of these posts to build our list of alternatives and similar projects - the last one was on 2021-06-12.
  • We made Lowdefy - An open-source, self-hosted, low-code framework to easily make web apps, admin panels, BI dashboards, workflows, and CRUD apps with YAML or JSON.
    In terms of data, you can use Knex to connect to SQL databases or connect to MongoDB. You could even use the MongoDB query language to transform data on the frontend (a third party API response for example).
  • How can i bulk insert Data into my sql database using node js | 2021-06-12
    I would suggest you to use a query builder such as Knex. You don’t have to write SQL yourself and it will also protect you from SQL injections.
  • Is Knex still viable ORM for production level apps? | 2021-05-22
    It seems to be maintained from the git repo here
  • Using TypeScript with Knex and Postgres
    I find the Knex documentation to be pretty good, and they have plenty of examples of using Typescript with the QueryBuilder -
  • Five conductive - and five innovative npm packages | 2021-05-15
    1.2) Knex - an SQL query builder
  • Prisma ORM: how to use the great database mapping package
    This isn't possible yet and something we'd like to offer at some point. Similar to what knex does: I've relayed this to our product team who will create an issue for this.
  • Knex Cheat Sheet | 2021-05-13
    See: Schema builder
  • Generate TypeScript definitions from PostgreSQL | 2021-04-14
    I've been enjoying using Knex.js database client for quite some time when implementing GraphQL API backends. One thing that it currently lucks though, is the ability to generate strongly typed (TypeScript) models from the actual database schema.
  • Best DB solution with migrations, seeders, etc? TypeORM, Sequelize, or something else? | 2021-04-12
    I had a great experience using Knex.js, but it's a query builder not an ORM. Good if you're looking for something a little closer to the SQL.
  • AMA - Self taught web developer, started learning in 2008
    Express.js is the primary web framework, almost everyone uses it. For database, you can try a query builder like knex.js and there's ORMs like Sequelize and TypeORM. But before this, you'd need to understand databases. I've worked with MySQL and PostgreSQL mainly, not much of an experience with NoSQL databases. For your API layers, you can check out GraphQL or a simple REST API using express. If it's super simple stuff, just make a JSON RPC.
  • Any good resources to learn how to connect SQL databases with Node?
    I prefer the simplicity of a query builder like knex. I think you will find it very intuitive if you already know SQL. Great docs too.
  • What is your current stack? | 2021-04-03
    How do you go to the database? Is Sequelize still alive? I heard TypeORM is cool now? Do you just go with knex the query builder or something DBMS-specific, such as mogodb client?
  • How the F**** does anyone use Prisma in production? | 2021-04-02
    I see that knex does support some typing. But you have to define what you expect it to return. So would you have type interfaces for each usage of knex, or would you rather define it in a prisma schema once and have your types for free beyond that.
  • Backstage architecture | 2021-03-29
    Backstage uses the Knex library which supports a multitude of databases. Despite that, Backstage has been tested to work with SQLite (for testing purposes) and PostgreSQL (for production workloads).
  • Are ORMs like sequelize necessary? | 2021-03-26
    The next lowest level thing I know is Knex. Now the Slonik readme actually links to an article about how query builders are an anti pattern. The argument being it obscures the actual SQL and the dynamic building it enables is provided by Slonik anyway. That said I think there is potentially value if you feel it makes SQL easier to write.