Ent: An Entity Framework for Go

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • sq

    sq is a type-safe data mapper and query builder for Go. (by bokwoon95)

    > at the same time, they provide little (or nothing) utilities to map the data coming from a complex query, back to objects

    Example of a query builder with built-in mapping capabilities (it’s mine):

    https://github.com/bokwoon95/sq

    I feel some exasperation when I see query builders that throw a query string back to the user and ask them to map the results themselves. That’s easily the most tedious and mistake-prone part of using SQL queries. In the case of my library, projection and mapping are handled by the same callback function so in order to SELECT a field you basically map it and it’s automatically added to the SELECT clause.

  • ent

    An entity framework for Go

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

  • Squirrel

    Fluent SQL generation for golang

    I've been using Ent for some time on a project and its been quite nice to just be able to write the schema in Go, testing has been a breeze with the enttest package, hooks work well, and everything feels intuitive to me unlike most other ORMs or ORM-adjacent tools.

    My preferred package before Ent was Squirrel [1] but I definitely plan to use Ent for future projects.

    [1] https://github.com/Masterminds/squirrel

  • vlcn-orm

    Develop with your data model anywhere. Query and load data reactively. Replicate between peers without a central server.

  • node-sql

    SQL generation for node.js

    > Eg, transform a schema type that describes my database tables into an easy-to-use query builder and data abstraction API with rich method chaining.

    TypeScript can do this. It was done already halfway-well 6 years ago with way fewer features in TypeScript (https://github.com/brianc/node-sql/blob/master/lib/types.d.t...) - today we can do much better.

  • typed-graphql-builder

    A fully type-safe graphql query builder, inspired by tql

    FWIW I've given up the SQL query builder route and instead went with GraphQL query builder / Hasura route (https://typed-graphql-builder.spion.dev/).

  • gqlgen

    go generate based graphql server library

    I have no experience in Django but in Ent with GraphQL.

    Ent is not a full-featured web framework so you need to implement many of features by your own or use other libraries (e.g. http server and session management).

    If you are only looking for ORM + GraphQL then I highly recommend trying Entgql, an Ent extension for GraphQL with Gqlgen library [1]. Once you define an ORM schema, it will generate GraphQL Query for Relay server. Still you need to implement GraphQL Mutations by your own but at least it will create Input types for you (both for Create/Update).

    [1]: https://github.com/99designs/gqlgen

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • atlas

    A modern tool for managing database schemas (by ariga)

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