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 — это база данных на основе Postgres, которая добавляет современную объектную модель данных, язык запросов на основе графов под названием EdgeQL, встроенные инструменты аутентификации и ИИ, а также управляемый облачный сервис.
Это сервер базы данных или просто ORM-библиотека поверх Postgres?Это полноценный сервер базы данных, а не только клиентская библиотека: он запускает собственный экземпляр, имеет свой язык запросов (EdgeQL), систему миграций, клиентские библиотеки для нескольких языков, CLI и управляемый облачный сервис.
Как запустить экземпляр Gel?Установите CLI, затем запустите экземпляр и откройте интерактивную оболочку EdgeQL — всего тремя командами; пользователи Windows устанавливают CLI через команду PowerShell. Рекомендуемая отправная точка — быстрое руководство по запуску за 10 минут.
Заменяет ли это работу с SQL и внешними ключами или мне всё равно нужно писать SQL?Gel заменяет табличную модель SQL с внешними ключами на схему из объектов и связей, которая запрашивается через EdgeQL вместо SQL. Поэтому модель мышления отличается от привычной реляционной схемы.
Для кого это — для разработчиков приложений, которые заменяют ORM, или для администраторов БД, которые работают с чистым Postgres?Это для разработчиков приложений, которые сейчас используют ORM или чистый SQL/Postgres и хотят получить слой схемы и запросов, ближе к тому, как они думают об объектах в коде.
Что EdgeQL даёт мне такого, чего нет в обычном SQL?EdgeQL возвращает богатые структурированные объекты вместо плоских строк, позволяет глубоко получать связанные объекты без JOIN и комбинировать запросы как выражения внутри других запросов, что значительно упрощает подзапросы и вложенные мутации.
Поддерживает ли Gel миграции схемы из коробки?Да, в составе полного набора инструментов базы данных вместе с CLI и клиентскими библиотеками Gel поставляется собственная система миграций.
Есть ли хостинг, чтобы не управлять базой данных самому?Да, предлагается Gel Cloud — управляемый вариант хостинга, который описан как самый простой способ запустить базу данных Gel в облаке.
Creator
geldata
Size
73.8 MB
Stars
14.2K
Age
9y
Commits · 90 Days