The core repository of implementing PostgreSQL compatible distributed database in Rust
See docs
docs/
- project documentationetc/
- scripts for convenient run of compatibility tests and other tools
ci/
- script helpers to run commands on GitHub Actions
local/
- scripts for local usagegradle/
- gradle wrapper to run tests/compatibility
testsnode_engine/
- module that glues all other together to handle incoming network request and execute it across other modulespostgres/
- crate to consolidate PostgreSQL functionality
query_ast/
- abstract syntax tree of parsed SQL queryquery_parser/
- parser that produce AST from SQL stringquery_response/
- module to represent successful or error response after query execution to a clientsql_engine/
- crate to consolidate SQL query engine functionality
catalog/
- API for accessing data and its definitiondata_definition/
- group of modules responsible to represent SQL DDL
queries
execution_plan
- data structures responsible for representing operations of Data Definition Language
part of SQL
data_manipulation/
- group of modules responsible to represent SQL DML
queries
operators/
- SQL operators like +
, -
, LIKE
, AND
, OR
and othersquery_plan/
- query plan that is executed over database dataquery_result/
- internal representation of query execution resulttyped_queries/
- represents query structure that is ready for type coercion and type checktyped_tree/
- typed binary tree of SQL operatorsuntyped_queries/
- represents query structure that is ready for type resolutionuntyped_tree/
- untyped binary tree of SQL operatorsdefinition_planner/
- API to create execution plan for a DDL queryentities/
- database entities
definition/
- database object names and its definitionstypes/
- SQL typesquery_analyzer/
- API to analyse a parsed SQL queryquery_planner/
- API to create execution plan for a SQL queryquery_processing/
- API to process a parsed/analyzed SQL query
type_check/
type_coercion/
type_inference/
scalar/
- representing primitive types as a scalar value that can be use as intermediate computational resultstorage/
- database transactional storage
api/
- type aliases and traits that defines api for in_memory
and persistent
storagebinary/
- representing primitive types as a raw binary vectorin_memory/
- in memory only storagepersistent/
- persistent storagetests/
compatibility/
- groovy based tests to check compatibility with PostgreSQL
erlang_client/
- erlang based testsfixtures/
- files needed to set up non-default local testingisomorphicdb
uses postgres-parser to parse PostgreSQL 13 SQL syntax which
requires LLVM. Thus, to build project you need to install LLVM and add it to $PATH
On Ubuntu the following command should be sufficient:
sudo apt install llvm
On MacOS with zsh
brew install llvm
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' ~/.zshrc
source ~/.zshrc
For now, it is local and manual - that means some software has to be installed on a local machine and queries result has to be checked visually.
psql
(PostgreSQL client)
PostgreSQL
binaries. On macOS, you can install it
with brew
executing the following command:brew install postgresql
isomorphicdb
instance with the command:
cargo run
psql
with the following command:
psql -h 127.0.0.1 -W
sql
scripts from compatibility
folder./etc/local/code_coverage.sh
./target/debug/coverage/index.html
in your browserjava
version 8
or 11
(that were tested)gradle
version 6
(that were tested)RUST_LOG=debug cargo run
from project folder in separate terminal window./etc/local/compatibility.sh