Our great sponsors
-
kysely
Discontinued A type-safe typescript SQL query builder [Moved to: https://github.com/kysely-org/kysely] (by koskimas)
-
serverless-analyze-bundle-plugin
A serverless plugin to visualize and analyze the bundle of a lambda bundled with serverless-esbuild.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Thatโs where Kysely comes to the rescue: Kysely is a type-safe and devX-friendly typescript SQL query builder. It was designed to work with PostgreSQL and MySQL, but it exposes a few classes that can let us write queries without being connected to an actual relational database.
Note that there is one minor drawback, though: Kysely will add 120KB in your Lambdas bundles (props to for serverless-analyze-bundle-plugin for helping me out with this ๐). It is not a lot, but not negligible either as NodeJS Lambdas bundles above 5MB negatively impacts their cold starts. So you might want to re-evaluate adding Kysely to your bundles if your query is not changing often.
Related posts
- Show HN: Tsynamo โ Type-friendly DynamoDB query builder for TypeScript
- Kysely โ type-safe TypeScript SQL query builder
- any typescript users, that'd be interested in using oracledb with kysely (the type-safe query builder)?
- Kysely - Typescript successor to Knex - `kysely-codegen` also generates types from your existing database.
- Connecting to Supabase vs directly to Postgres