MikroORM
Knex
Our great sponsors
MikroORM | Knex | |
---|---|---|
48 | 94 | |
7,055 | 18,622 | |
2.7% | 0.9% | |
9.9 | 8.1 | |
about 17 hours ago | 1 day ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
MikroORM
-
Rust GraphQL APIs for NodeJS Developers: Introduction
In my usual NodeJS tech stack, which includes GraphQL, NestJS, SQL (predominantly PostgreSQL with MikroORM), I encountered these limitations. To overcome them, I've developed a new stack utilizing Rust, which still offers some ease of development:
- I Hate NestJS
-
What's wrong with Node.js ORMs? Thousands of issues? Why?
https://www.npmjs.com/package/mikro-orm - 44 issues
-
Top 6 ORMs for Modern Node.js App Development
Mikro-ORM is a TypeScript ORM that focuses on simplicity and efficiency. It supports various SQL databases and MongoDB. Mikro-ORM is known for its simplicity and developer-friendly APIs. It provides a concise syntax for defining data models and relationships, making it easy to use.
-
We migrated to SQL. Our biggest learning? Don't use Prisma
I found MikroORM [0] to be quite reasonable if you're in the TS ecosystem already. It was also easy to do custom, raw queries, and really just felt like it wasn't in the way.
-
The Epic Stack by Kent C. Dodds
It also does code generation into its own module, so good luck with hoisting in a monorepo where you want multiple independent prisma schemas. MikroORM[1] is a much better alternative to Prisma in my opinion but any ORM carries some form of baggage.
-
Announcing a new TypeScript ORM
I recommend looking at https://mikro-orm.io/
-
NestJS Authentication with OAuth2.0: Configuration and Operations
MikroORM: to interact with our database;
- Ask HN: FOSS Projects Worth Donating To?
-
Well, shit. Objection.js has been sunset, which ORM/querybuilder did you move to?
So I'm not going to count on people ever picking it up, just straight up. I mean like I look at things like this: https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts and I wonder how tf is anyone other than the original author going to be able to pick it up and understand what is going on in the codebase well enough to start maintaining it themselves.
Knex
-
Create a Blog web app using Adonis.js 6
AdonisJS core team has created/maintains Lucid. It is a SQL query builder, and an Active Record ORM built on top of Knex.
-
Type-safe Data Access in Go using Prisma and sqlc
Now, why not use an ORM? I've seen performance issues too many times with ORMs. I prefer writing my own SQL to avoid surprises. After all, I know the database schema and writing code for a specific purpose very often leads to better performance than generic code. ORMs have to support all kinds of database schemas. I only have to support mine. Having successfully used Knex.js in NodeJS (a popular query builder) in the past, I know writing SQL queries myself is not hard and provides very good performance.
-
Can I create another WordPress that satisfies humanity?
Given the dynamic nature of the schema, we employ Knex, a query builder, for database access.
-
What's wrong with Node.js ORMs? Thousands of issues? Why?
https://www.npmjs.com/package/knex - 779 issues
-
Credentials Leak with Knex
This article will be focused on a security issue that I found in Knex and how to mitigate it, but I'll also talk briefly about the social aspects of this problem.
-
Why SQL is right for Infrastructure Management
SQL is an old, irregular language to work with, but it is better known than HCL and SQL already has it's own Pulumi/CDK in the form of every ORM with introspection (like Javascript's Prisma, Python's Django, Go's XO etc) and QueryBuilder (LINQ, Knex, etc) in whatever programming language you prefer. You probably already know it.
- Help with SQL and Serialport
-
Kysely: TypeScript SQL Query Builder
How does HN receive SQL builders in general? I feel like most of us agree ORMs are typically a bad idea. I feel like that almost instantly leaves the need for "something" to take its place. In my experience, it's typically been a query builder like this.
I've also tried:
https://www.npmjs.com/package/sql-template-strings ("out of date" since like 2016? https://www.npmjs.com/package/sql-template-tag might be better)
Are query builders an anti pattern? People who are doing serious/logic heavy stuff with SQL, how do you avoid a query builder (if at all?)
-
Promises, Thenables, & Lazy-evaluation: What, Why, How
Of course, this is a trivial example that you probably won’t find in production code, but there are many projects that use lazy-evaluated Promise-like objects. Probably the most common example is with database ORMs and query builders like Knex.js or Prisma.
-
MagLit - Free and Open Source Link Shortener with Privacy, Encryption, Password Protection and more!
why not just use a mariadb or postgres docker image? heck, even sqlite should be fine, given the simplicity of your needs. i work with nodejs myself, i'd highly recommend knexjs for this- it's super flexible!
What are some alternatives?
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
Sequelize - Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB (v6), DB2 and DB2 for IBM i.
TypeORM - ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Mongoose - MongoDB object modeling designed to work in an asynchronous environment.
pg-promise - PostgreSQL interface for Node.js
kysely - A type-safe typescript SQL query builder [Moved to: https://github.com/kysely-org/kysely]
slonik - A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.
drizzle-orm - Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
kysely - A type-safe typescript SQL query builder