Paul Krill
Editor at Large

Go language gets graph-based ORM

news
Feb 11, 20212 mins

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

go green light traffic signal by pawel czerwinski unsplash
Credit: Paweł Czerwiński

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author