Updated lib config and small stuff

This commit is contained in:
Adrien Bouvais 2025-01-23 17:31:41 +01:00
parent 6fa8d6b7c6
commit b2bd1e373b
7 changed files with 21 additions and 6 deletions

3
.gitignore vendored
View File

@ -8,3 +8,6 @@ engine.o
zig-out
test1
test2
fly.toml
dockerfile
.dockerignore

View File

@ -1,6 +1,6 @@
![alt text](https://github.com/MrBounty/ZipponDB/blob/main/docs/images/banner.png)
ZipponDB is a relational database written entirely in Zig from scratch with 0 dependencies.
ZipponDB is a database written entirely in Zig from scratch with 0 dependencies.
ZipponDB's goal is to be ACID, light, simple, and high-performance. It aims at small to medium applications that don't need fancy features but a simple and reliable database.

View File

@ -1,6 +1,6 @@
pub const BUFFER_SIZE = 1024 * 10; // Used a bit everywhere. The size for the schema for example. 10kB
pub const MAX_FILE_SIZE = 1024 * 1024; // 1MB
pub const CPU_CORE = 0;
pub const MAX_FILE_SIZE = 1024 * 1024 * 5; // Tried multiple MAX_FILE_SIZE and found 5Mb is good
pub const CPU_CORE = 0; // If 0, take maximum using std.Thread.getCpuCount()
// Debug
pub const PRINT_STATE = false;

View File

@ -1,5 +1,5 @@
pub const BUFFER_SIZE = 1024 * 1024; // Used a bit everywhere. The size for the schema for example. 10kB
pub const MAX_FILE_SIZE = 1024 * 1024; // 1MB
pub const MAX_FILE_SIZE = 1024 * 1024 * 5; // Tried multiple MAX_FILE_SIZE and found 5Mb is good
pub const CPU_CORE = 16;
// Debug
@ -17,7 +17,7 @@ pub const HELP_MESSAGE = struct {
\\run To run a query.
\\db Create or chose a database.
\\schema Initialize the database schema.
\\dump To export data in other format and backup.
\\dump To export data in other format and backup. (experimental)
\\quit Stop the CLI with memory safety.
\\
\\For more informations: https://mrbounty.github.io/ZipponDB/cli

View File

@ -1,12 +1,13 @@
User (
name: str,
email: str,
orders: []Order,
)
Order (
items: []Item,
quantity: []int,
at: datetime,
from: User,
)
Item (

11
schema/test Normal file
View File

@ -0,0 +1,11 @@
User (
name: str,
age: int,
email: str,
bday: date,
last_order: datetime,
a_time: time,
scores: []int,
best_friend: User,
friends: []User,
)