gel README

The project's README from github.com/geldata/gel. As one markdown file: README.md.

Gel

Stars license discord

Learn: build an app with Gel   •   Website   •   Docs   •   Blog   •   Discord   •   Twitter



What is Gel?

Gel is a new kind of database
that takes the best parts of
relational databases, graph
databases, and ORMs. We call it
a graph-relational database.



🧩 Types, not tables 🧩


Schema is the foundation of your application. It should be something you can read, write, and understand.

Forget foreign keys; tabular data modeling is a relic of an older age, and it isn't compatible with modern languages. Instead, Gel thinks about schema the same way you do: as object types containing properties connected by links.

type Person {
  required name: str;
}

type Movie {
  required title: str;
  multi actors: Person;
}

This example is intentionally simple, but Gel supports everything you'd expect from your database: a strict type system, indexes, constraints, computed properties, stored procedures...the list goes on. Plus it gives you some shiny new features too: link properties, schema mixins, and best-in-class JSON support. Read the schema docs for details.


🌳 Objects, not rows 🌳


Gel's super-powered query language EdgeQL is designed as a ground-up redesign of SQL. EdgeQL queries produce rich, structured objects, not flat lists of rows. Deeply fetching related objects is painless...bye, bye, JOINs.

select Movie {
  title,
  actors: {
    name
  }
}
filter .title = "The Matrix"

EdgeQL queries are also composable; you can use one EdgeQL query as an expression inside another. This property makes things like subqueries and nested mutations a breeze.

insert Movie {
  title := "The Matrix Resurrections",
  actors := (
    select Person
    filter .name in {
      'Keanu Reeves',
      'Carrie-Anne Moss',
      'Laurence Fishburne'
    }
  )
}

There's a lot more to EdgeQL: a comprehensive standard library, computed properties, polymorphic queries, with blocks, transactions, and much more. Read the EdgeQL docs for the full picture.


🦋 More than a mapper 🦋


While Gel solves the same problems as ORM libraries, it's so much more. It's a full-fledged database with a powerful and elegant query language, a migrations system, a suite of client libraries in different languages, a command line tool, and a managed cloud service. The goal is to rethink every aspect of how developers model, migrate, manage, and query their database.

Here's a taste-test of Gel's next-level developer experience: you can install our CLI, spin up an instance, and open an interactive EdgeQL shell with just three commands.

$ curl --proto '=https' --tlsv1.2 -sSf https://geldata.com/sh | sh
$ edgedb project init
$ edgedb
edgedb> select "Hello world!"

Windows users: use this Powershell command to install the CLI.

PS> iwr https://geldata.com/ps1 -useb | iex

Get started

To start learning about Gel, check out the following resources:


Contributing

PRs are always welcome! To get started, follow this guide to build Gel from source on your local machine.

File an issue 👉
Start a Discussion 👉
Join the discord 👉


License

The code in this repository is developed and distributed under the Apache 2.0 license. See LICENSE for details.

gel (geldata/gel)

Searching Database…

14.2K ·GitHub
Gel 是什么?Gel 是基于 Postgres 构建的数据库,增加了现代的基于对象的数据模型、名为 EdgeQL 的图查询语言、内置的认证(Auth)和 AI 工具,以及托管云服务。
这是数据库服务器,还是只是构建在 Postgres 之上的 ORM 库?它是一个完整的数据库服务器,而不只是客户端库:它运行自己的实例,拥有自己的查询语言(EdgeQL)、迁移系统、多种语言的客户端库、命令行工具(CLI)以及托管云服务。
我该如何启动一个 Gel 实例?只需三条命令:安装 CLI,然后启动实例并打开交互式 EdgeQL 命令行;Windows 用户通过 PowerShell 命令安装 CLI。推荐从 10 分钟快速入门指南开始。
它会取代 SQL 和外键建模吗,还是我仍然需要写 SQL?Gel 用对象与链接的模式取代了 SQL 的表格式、外键模型,并通过 EdgeQL 而不是 SQL 进行查询,因此其思维模型与典型的关系型数据库设置有所不同。
这是给谁用的?是替换 ORM 的应用开发者,还是管理原生 Postgres 的数据库管理员?它面向目前使用 ORM 或原生 SQL/Postgres,并希望使用更接近代码中对象思维方式的模式和查询层的应用开发者。
EdgeQL 能提供哪些普通 SQL 没有的功能?EdgeQL 返回结构化的丰富对象,而不是扁平的行;可以在不使用 JOIN 的情况下深度获取关联对象;还允许把查询作为表达式嵌套在其他查询中,使子查询和嵌套变更操作变得简单得多。
Gel 支持开箱即用的模式迁移吗?支持。Gel 自带迁移系统,作为完整数据库工具链的一部分,与 CLI 和客户端库一同提供。
有没有托管选项,让我不必自己管理数据库?有。Gel Cloud 是一种托管服务选项,官方描述它是在云端运行 Gel 数据库最省心的方式。
Creator
geldata
Size
73.8 MB
Stars
14.2K
Age
9y
Commits · 90 Days