Go language gets graph-based ORM

Called ent, the open source entity framework features an API for modeling any database schema or graph structure as Go objects.

Go language gets graph-based ORM
Paweł Czerwiński (CC0)

With the ent open source project, an Israeli Facebook developer is providing the Google-developed Go language with an entity framework, intended to make it easier to build and maintain Go applications with complex data models.

Providing ORM (object-relational mapping) for modeling and querying data, the ent framework provides an API for modeling any database schema as Go objects. Users can run queries and aggregations and traverse graph structures. Underlying ent are the following principles:

  • Modeling a database schema as a graph structure.
  • Defining schema as programmatic Go code.
  • Static typing based on code generation.
  • Easy-to-write database queries and graph traversals.
  • An ability to extend and customize using Go templates.

The schema configuration for ent is verified by entc, the ent codegen, which generates an idiomatic, statically typed API. The ent framework supports MySQL, Gremlin, and, primarily for testing, SQLite. The technology was first introduced in October 2019, arising out of an effort at Facebook to develop a graph-based ORM for Go.

Releases of ent have been arriving roughly every few weeks for the past year. Version 0.6.0 was released last week, accessible on GitHub. A roadmap for ent 1.0 includes capabilities such as JSON type predicates and horizontal sharding.

Go is an open source programming language created by Google that features concurrency and functional programming capabilities. It is perhaps best known as the language used to develop Docker and Kubernetes in the cloud-native container ecosystem.

Copyright © 2021 IDG Communications, Inc.

InfoWorld Technology of the Year Awards 2023. Now open for entries!