Taking the Drizzle Challenge
Rado is a rewritten Typescript query builder that offers immutable queries, simpler typing, and universal database support, targeting users seeking a lightweight alternative to Drizzle ORM, despite limited documentation.
Read original articleThe article discusses the development and features of Rado, a Typescript query builder, which has been rewritten to address shortcomings found in the original version and to align more closely with the popular Drizzle ORM. The author began Rado in 2022, aiming to create a simpler alternative to existing solutions that were either too complex or deviated from SQL. The rewrite, Rado 1.0.0, introduces several enhancements, including immutable queries, a simpler TypeScript typing system, and support for universal queries that can run on any database. Unlike Drizzle, which has a separate ORM interface, Rado allows for building queries directly within the query builder, making it more intuitive. Rado also supports auto-migrations and is designed to be lightweight, with a smaller package size compared to Drizzle. However, it lacks some features found in Drizzle, such as a comprehensive ecosystem and extensive documentation. The author emphasizes that Rado is suitable for users who prefer a lightweight alternative to Drizzle without the ORM features, while also highlighting potential pitfalls like limited documentation and community support.
- Rado is a Typescript query builder rewritten to improve upon its original version and align with Drizzle ORM.
- It features immutable queries, simpler TypeScript types, and supports universal queries across different databases.
- Rado is lightweight, with a smaller package size compared to Drizzle, and includes auto-migration capabilities.
- The project is aimed at users who want a simpler alternative to Drizzle without its ORM features.
- Rado currently has limited documentation and community support, which may pose challenges for new users.
Related
The Ultimate Database Platform
AverageDB, a database platform for developers, raised $50 million in funding. It offers speed, efficiency, serverless architecture, real-time data access, and customizable pricing. The platform prioritizes data privacy and caters to diverse user needs.
Show HN: Open-source CLI coding framework using Claude
The GitHub repository for "Dravid (DRD) - AI-Powered CLI Coding Framework" streamlines coding with AI. It aids in project setup, code generation, and file management. The README covers features, installation, usage, and support.
Rye Language
Rye Language is a high-level, dynamic programming language emphasizing interactive use, backend development, and information processing. It supports various functionalities, runs on multiple platforms, and promotes user-friendly information manipulation with strict design principles.
A type system for RCL, part 2: The type system
Ruud van Asseldonk introduces RCL, a JSON extension with a strong type system. RCL enforces type safety, supports static and gradual typing, and addresses challenges like covariance to balance usability and error reporting.
Diamond-types – the fastest CRDT. WIP
Diamond Types is a high-performance Rust CRDT for concurrent text editing in peer-to-peer networks, offering significant speed improvements and future support for JSON-style data types, with comprehensive documentation available.
What's worse is there's no traditional up / down migration for those familiar with knex. There's no "down" at all from what we saw.
There is an issue opened on Drizzle about it and they say they've started work on an up/down migrator, but who knows when that will be done.
https://github.com/drizzle-team/drizzle-orm/discussions/1339
So I've spent the past day converting everything to Kysely instead. ChatGPT was pretty good about converting from Drizzle to Kysely if you fed it the Drizzle schema and repository code.
In terms of developer experience, (maybe we didn't play around with it enough), Drizzle returns things as arrays in postgres, whereas in Kysely you can have it return a single item (or throw it if you want if it can't be found) instead of an array. It's a slight annoyance to have to de-structure the results in drizzle for a single item.
Overall for us, the deal-breaker was the sub-par and too-magical migrations in Drizzle. If you wanted to write custom business logic for your migration, it seems like you had to write it in the generated SQL files directly.
Compare this to Kysely, where you have a knex-style up/down and can write your business logic and migration changes in Typescript.
Drizzle Studio via drizzle-kit, however, is pretty great, and we're continuing to use that since it doesn't require any drizzle-specific schema defs to work.
I would recommend Kysely over Drizzle at this point in time and re-evaluate once Drizzle has a better experience around migrations.
There's a vast array of features and capabilities that can best be made use of by ........ writing SQL.
ChatGPT is incredibly good at writing SQL so its super easy.
AND, BONUS ...... you get to carry accumulated knowledge forward because you are actually learning SQL instead of yet another abstraction.
Write stored procedures - they are awesome, write SQL that returns JSON, use all those weird and wonderful database features like JSON querying storage, indexing and returns, like full text search, write CTE's, write event triggers, write Row Based Access Control, make message queues with SKIP LOCKED. Write Foreign Data Wrappers, make partial indexes and window functions.
Stop being scared of SQL, stop needing to hide behind someone's database abstraction and learn the joy of SQL. Let the database do the work.
Prisma is now taking a lot of ideas from the drizzle team, if I were to start over again I’d just use prisma as it’s actually production ready and is starting to incorporate the good parts of drizzle.
I always feel like I'm missing something because it looks like you have to learn a specific library instead of a general purpose language.
Related
The Ultimate Database Platform
AverageDB, a database platform for developers, raised $50 million in funding. It offers speed, efficiency, serverless architecture, real-time data access, and customizable pricing. The platform prioritizes data privacy and caters to diverse user needs.
Show HN: Open-source CLI coding framework using Claude
The GitHub repository for "Dravid (DRD) - AI-Powered CLI Coding Framework" streamlines coding with AI. It aids in project setup, code generation, and file management. The README covers features, installation, usage, and support.
Rye Language
Rye Language is a high-level, dynamic programming language emphasizing interactive use, backend development, and information processing. It supports various functionalities, runs on multiple platforms, and promotes user-friendly information manipulation with strict design principles.
A type system for RCL, part 2: The type system
Ruud van Asseldonk introduces RCL, a JSON extension with a strong type system. RCL enforces type safety, supports static and gradual typing, and addresses challenges like covariance to balance usability and error reporting.
Diamond-types – the fastest CRDT. WIP
Diamond Types is a high-performance Rust CRDT for concurrent text editing in peer-to-peer networks, offering significant speed improvements and future support for JSON-style data types, with comprehensive documentation available.