edgedb/edb
2024-02-03 15:42:07 +01:00
..
api Implement blocked readiness state (#6189) 2023-09-28 11:25:39 -07:00
cli Add the new 'edb cli' command. 2021-06-29 13:27:40 -07:00
common Formatting of stack tracebacks in tests (#6756) 2024-02-03 15:42:07 +01:00
edgeql Fix a scalar type dependecy bug. 2024-02-01 13:56:58 -05:00
edgeql-parser Branches, and fast branch creation (#6721) 2024-01-31 12:58:35 -08:00
errors Implement blocked readiness state (#6189) 2023-09-28 11:25:39 -07:00
graphql Rename .generic to .is_non_concrete and few other refactors (#6764) 2024-02-01 18:52:51 +01:00
graphql-rewrite Fix parser for old versions of Rust (#6199) 2023-09-29 16:53:34 +02:00
ir Rename .generic to .is_non_concrete and few other refactors (#6764) 2024-02-01 18:52:51 +01:00
lib Add Slack OpenID Connect provider (#6720) 2024-01-23 21:18:58 -05:00
pgsql Fix some major issues with the error context printer (#6772) 2024-02-01 22:44:07 -08:00
protocol Add multi-tenant support (#5882) 2023-08-10 09:23:41 -05:00
schema Rename .generic to .is_non_concrete and few other refactors (#6764) 2024-02-01 18:52:51 +01:00
server Supress idle tx timeout during compilation (#6760) 2024-02-02 15:03:15 -08:00
testbase Make branch tests compare the original and copied schemas. 2024-02-01 13:56:58 -05:00
tools Formatting of stack tracebacks in tests (#6756) 2024-02-03 15:42:07 +01:00
.gitignore Build and serialize parser spec during build process (#6302) 2023-10-18 22:23:05 +02:00
__init__.py Ensure that importing edb.tools has no side effects 2019-10-19 16:28:47 -04:00
buildmeta.py Branches, and fast branch creation (#6721) 2024-01-31 12:58:35 -08:00
README.md Some initial documentation notes on the compiler (#4390) 2022-09-20 09:53:21 -07:00

Directory overview

Here is a list of most of the important directories in EdgeDB, along with some of the key files and subdirectories in them.

This list is partial, focused on the compiler, and ordered conceptually.

  • schema/ - Representation of the schema, and implementation of schema modifications (both SDL migrations and DDL statements). The schema is an immutable object (implemented as a bunch of immutable maps), and making changes to it produces a new schema object. Objects stored in the schema are represented in the compiler as proxy objects, and fetching attributes from them requires passing in a schema.

  • edgeql/ - EdgeQL frontend tools - AST, parser, first stage compiler, etc

    • edgeql/ast.py - EdgeQL AST
    • edgeql/parser/ - Parser. Uses https://github.com/MagicStack/parsing
    • edgeql/compiler/ - Compiler from EdgeQL to our IR
    • edgeql/tracer.py and edgeql/declarative.py - Analysis to convert SDL schema descriptions to DDL that will create them.
  • ir/ - Intermediate Representation (IR) and tools for operating on it

    • edgeql/ir/pathid.py - Definition of "path ids", which are used to identify sets
    • edgeql/ir/ast.py - Primary AST of intermediate representation. The IR contains no direct references to schema objects; information from the schema that is needed in the IR needs to be explicitly placed there. There are TypeRef and PointerRef objects that do this for types and pointers.
    • edgeql/ir/scopetree.py - Representation of "scope tree", which computes and tracks where sets are "bound". The IR output of the compiler consists of both an IR AST and a scope tree, needed to interpret it.
  • pgsql/ - PostgreSQL backend tools - AST, codegen, second stage compiler, etc

    • pgsql/ast.py - SQL AST. The AST contains both information for the actual SQL AST, along with a large collection of metadata that is used during the compilation process.
    • pgsql/codegen.py - SQL codegen. Converts AST to SQL.
    • pgsql/compiler/ - IR to SQL compiler.
    • pgsql/delta.py - Generates SQL DDL from delta trees.
  • lib/ - Definition of EdgeDB's standard library

    • lib/schema.edgeql - Definition of the parts of the schema that are exposed publically.
  • graphql/ - GraphQL to EdgeQL compiler

  • server/ - Implementation of the EdgeDB server and protocol handling

    • server/compiler - The interface between the server and the compiler