Skip to content

Commit

Permalink
Merge pull request #3 from JEleniel/design
Browse files Browse the repository at this point in the history
Most of the SQL syntax is documented, still WIP
  • Loading branch information
JEleniel authored Dec 12, 2024
2 parents d20d7f7 + 7677df5 commit 49e8c04
Show file tree
Hide file tree
Showing 58 changed files with 3,044 additions and 1,606 deletions.
3 changes: 3 additions & 0 deletions .local/syncdesign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

rsync -rh --progress /home/jeleniel/obsidian/Master/ba-Projects/EpilogLite/sql_syntax/* $(dirname "$0")/../design/sql_syntax/
876 changes: 179 additions & 697 deletions LICENSE.md

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# EpilogLite Source Repository

This repository contains the complete source code for the EpilogLite database engine, including test scripts.
This repository contains the complete source code for the EpilogLite database engine, including test scripts.

See the [on-line documentation](https://github.com/jeleniel/epiloglite/wiki) for more information about what EpilogLite is and how it works from a user's perspective. This [README.md](README.md) file is about the source code that goes into building EpilogLite, not about how EpilogLite is used.
See the [on-line documentation](https://github.com/jeleniel/epiloglite/wiki) for more information about what EpilogLite is and how it works from a user's perspective. This [README.md](README.md) file is about the source code that goes into building EpilogLite, not about how EpilogLite is used.

## Version Control

Expand All @@ -14,17 +14,15 @@ Bug reports, enhancement requests, and documentation suggestions can be opened a

The preferred way to ask questions or make comments about EpilogLite is to visit the [EpilogLite Discussions](https://github.com/jeleniel/epiloglite/discussions).

If you think you have found a bug that has security implications and
you do not want to report it on the public forum, you can send a private
email to security at neurodivergentnetworking dot org.
If you think you have found a bug that has security implications and you do not want to report it on the public forum, you can send a private email to jeleniel at turkeyofman dot com.

## GNU LESSER GENERAL PUBLIC LICENSE

The EpilogLite source code is released under the GNU Lesser General Public License 3.0 only. See [COPYING.md](COPYING.md) for details.
The EpilogLite source code is released under the GNU Lesser General Public License 3.0 only. See [LICENSE.md](LICENSE.md) for details.

## Testing and Compiling

Since this is a Rust application, the normal 'cargo' commands can be used to test or build the application.
Since this is a Rust application, the normal 'cargo' commands can be used to test or build the application.

To execute the test suite run:

Expand All @@ -42,5 +40,4 @@ The compiled binaries will be in the 'target' folder after the build completes.

## How It All Fits Together

EpilogLite is modular in design.
See the [architectural description](design/ARCHITECTURE.md) for details. Other documents that are useful in helping to understand how EpilogLite works include the [file format](design/FILEFORMAT.md) description, the [virtual machine](design/VIRTUALMACHINE.md) that runs prepared statements, the description of [how transactions work](design/TRANSACTIONS.md), and the [overview of the query planner](design/QUERYPLANNER.md).
EpilogLite is modular in design. See the [architectural description](design/ARCHITECTURE.md) for details. Other documents that are useful in helping to understand how EpilogLite works include the [file format](design/FILEFORMAT.md) description, the [virtual machine](design/VIRTUALMACHINE.md) that runs prepared statements, the description of [how transactions work](design/TRANSACTIONS.md), and the [overview of the query planner](design/QUERYPLANNER.md).
16 changes: 9 additions & 7 deletions design/ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# EpilogLite Architecture

status: draft

## Introduction

EpilogLite is an implementation of the SQLite database library using pure Rust. This document describes the architecture of the EpilogLite library crate. The information here is useful to those who want to understand or modify the inner workings of EpilogLite.
Expand Down Expand Up @@ -48,7 +50,7 @@ classDiagram
sqlite3 --> database
database --> processor
processor --> virtual_machine
processor --> tokenizer
virtual_machine --> btree
Expand All @@ -65,7 +67,7 @@ classDiagram

### epiloglite

The public interface is found in the `epiloglite` module. Functions are generally asynchronous.
The public interface is found in the `epiloglite` module. Functions are generally asynchronous.

### sqlite

Expand All @@ -77,7 +79,7 @@ This module contains the components responsible for parsing and execution od SQL

#### epiloglite::command::processor

This module coordinates the tokenization, parsing, and execution of SQL statements.
This module coordinates the tokenization, parsing, and execution of SQL statements.

#### epiloglite::command::tokenizer

Expand All @@ -93,7 +95,7 @@ After the semantics have been assigned and a parse tree constructed the code gen

### epiloglite::comand::virtual_machine

The bytecode from the code generator is handed off to a virtual machine to be executed.
The bytecode from the code generator is handed off to a virtual machine to be executed.

### epiloglite::persistence::btree

Expand All @@ -105,16 +107,16 @@ The B-Tree module requests information from the block storage in fixed size page

### epiloglite::os

In order to provide portability across operating systems EpilogLite uses an abstract Virtual File System ("VFS"). The VFS provides methods for finding, opening, creating, modifying, and closing files on block storage. In addition, the OS Interface provides functions for other OS specific tasks, such as finding the current time, and generating randomness.
In order to provide portability across operating systems EpilogLite uses an abstract Virtual File System ("VFS"). The VFS provides methods for finding, opening, creating, modifying, and closing files on block storage. In addition, the OS Interface provides functions for other OS specific tasks, such as finding the current time, and generating randomness.

### epiloglite::utility

Memory allocation, string handling, data type conversion routines, and other utility functions are in the Utilities module.
Memory allocation, string handling, data type conversion routines, and other utility functions are in the Utilities module.

## Tests

Tests are implemented in the same file as the components under test, in keeping with the common Rust approach.

```rust
cargo test
```
```
2 changes: 2 additions & 0 deletions design/FILEFORMAT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# EpilogLite ("EL") Database Format

status: draft

## Overview

This document describes and defines the database format used by EpilogLite. Because EpilogLite is designed to be drop-in compatible with SQLite ("SL") it is based off the [SQLite Database File Format 3.0.0](https://www.sqlite.org/fileformat2.html). Whenever EL extends the SL format backwards compatability is maintained, unless noted otherwise.
Expand Down
Loading

0 comments on commit 49e8c04

Please sign in to comment.