Flyweight: An ORM for SQLite

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • flyweight

    An ORM for SQLite

  • better-sqlite3

    The fastest and simplest library for SQLite3 in Node.js.

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

    SQLDelight - Generates typesafe Kotlin APIs from SQL

  • You would really like sqldelight[1] then. It takes the concept of an ORM and flips it on its head. Instead of mapping function calls to SQL statements, it lets you write SQL statements and then generates classes for you that have methods for those statements.

    For instance, you could have a SQL statement like getCardsForFight: select * from fights where cardId = ? and titleFight = ?, and it would generate a class that has a method getCardsForFight(cardId: number, titleFight: number).

    [1]: https://github.com/cashapp/sqldelight

  • sqlc

    Generate type-safe code from SQL

  • Knex

    A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.

  • MikroOrm is a pretty fantastic project IMO.

    It uses Knex as the query builder so maybe you can just use that directly: https://knexjs.org/

  • sqlitedao

    Simple dao for sqlite for personal/desktop projects

  • Here's a python (pip) version of the same concept:

    https://github.com/Aperocky/sqlitedao

    https://pypi.org/project/sqlitedao

    Same concept, huge speed boost to personal projects.

  • LINQ to DB

    Linq to database provider.

  • I had a positive experience with Linq2db? https://github.com/linq2db/linq2db

    I mention because I had something of the opposite experience with it. It not only ended up yielding the correct queries, but I saw a significant increase in performance. And the neat thing about it, beyond ORM and linq-to-sql, is a common interface amongst providers - so you can do things like swap from SQLite to Postgres with 1 line* of code, so long as you're not using provider specific extensions.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • sequelts

  • The only thing I can imagine where this would be useful is when you don't have control about what DB is being used, for example, when building a product that should be compatible with Postgres and MariaDB (and each is getting used). However, in the age of containerization, this isn't a big problem any more.

    In some ORMs, I need to create types that the result of a query containing JOINs is mapped to. Others don't support them _at all_. In TypeORM, there is a query builder which forces you to put in _some_ SQL for things like "WHERE a in (b, c)".

    I created a proof of concept of a different approach: Just embrace SQL and provide static typing based on the query. The return type of a query is whatever that thing is that the query returns in the context of the database schema. It's possible to do in TypeScript, by parsing the SQL query at development time:

    https://github.com/nikeee/sequelts

    One benefit is that it does not need any runtime code, as it's just a type layer over SQL. You don't have to rely on some type-metadata that TypeScript emits. That's why it also works with JavaScript only.

  • mayim

    The *NOT* ORM hydrator

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

  • Show HN: Riza – Safely run untrusted code from your app

    1 project | news.ycombinator.com | 30 Apr 2024
  • Give Up Sooner

    1 project | dev.to | 13 Mar 2024
  • ORMs are nice but they are the wrong abstraction

    7 projects | news.ycombinator.com | 1 Feb 2024
  • 👻Top 8 Free, Open Source SQL Clients🔥

    8 projects | dev.to | 4 Sep 2023
  • Open-sourcing SQX, a way to build flexible database models in Go

    5 projects | news.ycombinator.com | 2 Sep 2023