ADVICE WANTED - Typescript PostgreSQL without ORM

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • kysely

    Discontinued A type-safe typescript SQL query builder [Moved to: https://github.com/kysely-org/kysely] (by koskimas)

  • I dislike ORMs and have been using Kysely https://github.com/koskimas/kysely and https://github.com/RobinBlomberg/kysely-codegen for a small project and so far I love it. It's a mapper/query builder that is equivalent to Dapper in C# (without the query builder) but with the power of typescript's type system to enforce proper queries. You can also bypass something with the sql to write raw SQL.

  • kanel

    Generate Typescript types from Postgres

  • I have so far found: - kanel https://github.com/kristiandupont/kanel - and pg-to-ts https://github.com/danvk/pg-to-ts

  • 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.

    SurveyJS logo
  • pg-to-ts

    Generate TypeScript interface definitions from your Postgres schema

  • I have so far found: - kanel https://github.com/kristiandupont/kanel - and pg-to-ts https://github.com/danvk/pg-to-ts

  • SQLDelight

    SQLDelight - Generates typesafe Kotlin APIs from SQL

  • Sounds like you want what SQLDelite offers, but for TypeScript. SQLDelite is only for Kotlin and SQLite though.

  • kysely-codegen

    Generate Kysely type definitions from your database.

  • I dislike ORMs and have been using Kysely https://github.com/koskimas/kysely and https://github.com/RobinBlomberg/kysely-codegen for a small project and so far I love it. It's a mapper/query builder that is equivalent to Dapper in C# (without the query builder) but with the power of typescript's type system to enforce proper queries. You can also bypass something with the sql to write raw SQL.

  • slonik

    A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.

  • I don’t think it offers codegen for types but slonik is worth checking out given what you’re interested in.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts