better-sqlite3
drizzle-orm
Our great sponsors
better-sqlite3 | drizzle-orm | |
---|---|---|
28 | 47 | |
5,015 | 19,712 | |
3.0% | 10.8% | |
8.0 | 9.7 | |
11 days ago | 2 days ago | |
C++ | TypeScript | |
MIT License | Apache License 2.0 |
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.
better-sqlite3
- From Frontend to Backend
- Convince me to use better-sqlite3
-
Build A Full-Stack Typescript Application with Nuxt and tRPC
In the second video of the series, we are separating routers and adding SQLite, Better SQLite 3, Database to the application to show access to context for performing a simple query and mutation.
-
How practicle is it to have a textfile based database with an SQLite API?
If I were charged with this task I'd probably take an actual SQLite DB and write methods to parse data from text files, then process it within SQLite, and serialize it back to the text file when an API method is called or after each processing step. A fresh DB engine, fully re-implemented to match SQLite's API is insane unless you're a prodigy or have a sizable team and will come with numerous downsides. I can recommend https://github.com/WiseLibs/better-sqlite3 and https://github.com/loveencounterflow/dbay
- VS Code as a dependency for an NPM module
-
Show HN: Doculite – Use SQLite Like Firestore
better-sqlite3 is orders of magnitude faster than the async SQLite bindings. We found this to be true when testing SQLite options for Notion's desktop app anyways.
https://github.com/WiseLibs/better-sqlite3#why-should-i-use-...
-
Drizzle ORM, SQLite and Nuxt JS - Getting Started
Better SQLite is a wrapper around the SQLite database engine that provides a number of improvements over the standard SQLite API. One of those benefits is type safety, Better SQLite uses TypeScript to provide type safety for queries, which can help to prevent errors.
-
Node - code structure when "being synchronous" is the outlier
better-sqlite3 does the job synchronously
-
SvelteKit 1.0 with SQLite Tutorial (Self Promotion)
I used better-sqlite3 . It is simple to use as it is synchronous. I don't know if it scales good (at least the docs say it) but works great for my small use cases.
-
I Migrated from a Postgres Cluster to Distributed SQLite with LiteFS
Kent's recommended NodeJS module, `better-sqlite3`, has some very nifty features including the creation of JavaScript user-defined functions[0] that (if I understand this right) can be called from SQLite. Combined with TRIGGERs, I wonder if it might fire a function within the app when an UPDATE/INSERT happens from a different process? (This is me wondering out loud, I don't actually know.)
I also recommend checking out Replicache[1] and alternatives, which may be a better way to handle the networking and database replication so that it doesn't rely on the underlying DB.
[0] https://github.com/WiseLibs/better-sqlite3/blob/HEAD/docs/ap...
drizzle-orm
-
Get started with Drizzle ORM and Xata's Postgres service
Drizzle ORM is a very popular TypeScript ORM that provides type safe access to your database, automated migrations, and a custom data model definition.
-
Shape Typing in Python
> being able to have a completely typesafe ORM such as Drizzle (https://orm.drizzle.team/) feels like a Rubicon moment, and touching anything else feels like a significant step backwards.
Alright, but there's nothing stopping you from having a completely typesafe ORM in python, is there?
Sure, there's isn't really one that everyone uses yet, but the python community tends to be a bit more cautious and slower to adopt big changes like that.
-
Don't use your ORM entities for everything – embrace the SQL
Drizzle [1] comes pretty close the last time I checked.
[1]: https://orm.drizzle.team
-
I Deployed My Own Cute Lil’ Private Internet (a.k.a. VPC)
Each app’s front end is built with Qwik and uses Tailwind for styling. The server-side is powered by Qwik City (Qwik’s official meta-framework) and runs on Node.js hosted on a shared Linode VPS. The apps also use PM2 for process management and Caddy as a reverse proxy and SSL provisioner. The data is stored in a PostgreSQL database that also runs on a shared Linode VPS. The apps interact with the database using Drizzle, an Object-Relational Mapper (ORM) for JavaScript. The entire infrastructure for both apps is managed with Terraform using the Terraform Linode provider, which was new to me, but made provisioning and destroying infrastructure really fast and easy (once I learned how it all worked).
-
Exploring Astro DB
It's just SQL so you can take it out at any moment and move to any other DB provider. The package for working with Astro DB, @astrojs/db, includes Drizzle ORM so migration to a different provider should be relatively painless
- ORMs are nice but they are the wrong abstraction
- Drizzle TypeScript ORM
-
Basic analytics with Vercel Postgres, Drizzle & Astro
Since Vercel's analytics pricing is a bit too expensive for my use case (where I hit the limit of 2,500 requests per month), and I didn't like using Google Analytics (not a big fan of Google), I decided to build my own analytics dashboard. Databases was something I didn't work with much before directly, so I decided to use an ORM, Drizzle, which is quite lightweight and easy to use.
-
Edge Functions: Node and native NPM compatibility
do yourself a favor and ditch Prisma. It's a bloody mess of a project and codebase. I recommend https://github.com/drizzle-team/drizzle-orm to anyone that'll listen.
-
Drizzle is just as unready for prime-time as Prisma, what else is there?
I myself ran into some issues when I started using drizzle with mysql. They had issues in the way they were handling datetime types. At the time I just used workarounds but then decided to submit a PR since the solution was pretty simple. I just liked drizzle's approach so much that I ended up committing more PRs. At this point, I'm one of the mayor contributors of the library. I think that we have to give some leeway to OSS libraries. Managing OSS is not easy, everybody's issues are important and mayor to them, but there's just so many hours in the day to work for free (or very little). At the end of the day, it's just software prone to have issues.
What are some alternatives?
sveltekit-prisma - A sample repository to show how SvelteKit and Prisma work together.
kysely - A type-safe typescript SQL query builder
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
SQLitePlus - A modern C++ header only SQLite3 wrapper
MikroORM - TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, MS SQL Server, PostgreSQL and SQLite/libSQL databases.
dqlite - Embeddable, replicated and fault-tolerant SQL engine.
knex-tree - Query hierarchical data structures in sql with knex
node-sqlite3 - SQLite3 bindings for Node.js
MongoDB - The MongoDB Database
graphql-ws - Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client.
hono - Web Framework built on Web Standards