Skip to content

Commit e848be9

Browse files
committed
Good docs update, stillo need some work. Need to take a step back and think
1 parent 9ae9b65 commit e848be9

23 files changed

+722
-522
lines changed

README.md

-45
Original file line numberDiff line numberDiff line change
@@ -86,51 +86,6 @@ Here, we update the first 5 `User` entities named 'bob' to capitalize the name a
8686
UPDATE User [5] {name='bob'} TO (name = 'Bob')
8787
```
8888

89-
## Vs SQL
90-
91-
```sql
92-
SELECT * FROM User
93-
```
94-
95-
```
96-
GRAB User
97-
```
98-
99-
```sql
100-
SELECT *
101-
FROM your_table_name
102-
WHERE name = 'Bob'
103-
AND (age > 30 OR age < 10);
104-
```
105-
106-
```
107-
GRAB User {name = 'Bob' AND (age > 30 OR age < 10)}
108-
```
109-
110-
```sql
111-
SELECT u1.name AS user_name, GROUP_CONCAT(u2.name || ' (' || u2.age || ')') AS friends_list
112-
FROM User u1
113-
LEFT JOIN User u2 ON ',' || u1.friends || ',' LIKE '%,' || u2.id || ',%'
114-
WHERE u1.age > 30
115-
GROUP BY u1.name;
116-
```
117-
118-
```
119-
GRAB User [name, friends [name, age]] {age > 30}
120-
```
121-
122-
```sql
123-
SELECT u1.name AS user_name, GROUP_CONCAT(u2.name || ' (' || u2.age || ')') AS friends_list
124-
FROM User u1
125-
LEFT JOIN User u2 ON ',' || u1.friends || ',' LIKE '%,' || u2.id || ',%'
126-
WHERE u2.age > 30
127-
GROUP BY u1.name;
128-
```
129-
130-
```
131-
GRAB User [name, friends [name, age] {age > 30}]
132-
```
133-
13489
## Link query - Not yet implemented
13590

13691
You can also link query. Each query returns a list of UUID of a specific struct. You can use it in the next query.

docs/Benchmark.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Benchmark
22

3-
***Benchmark are set to quicly evolve. I have currently multiple ideas to improve perf***
3+
***Benchmark are set to quicly evolve. I have currently multiple ideas to improve performance.***
44

55
## Command
66

7-
You can run `zig build benchmark` if you clone the repo to benchmark your machine.
7+
You can run `zig build benchmark` if you clone the repo to benchmark your machine. [More info.](/ZipponDB/build)
88

99
Here an example on my machine:
1010

docs/Quickstart.md

+13-22
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,23 @@ This guide will help you set up and start using ZipponDB quickly.
66

77
Obtain a binary for your architecture by:
88

9-
- Building from source code (tutorial coming soon)
10-
- Downloading a pre-built binary from the releases page (coming soon)
9+
- Downloading a pre-built binary from the [releases page](https://github.com/MrBounty/ZipponDB/releases)
10+
- Building from [source code](https://mrbounty.github.io/ZipponDB/build)
1111

12-
## Step 2: Create a Database
12+
Once with the binary, run it to get access to the CLI.
1313

14-
Run the binary to start the Command Line Interface. Create a new database by running:
14+
## Step 2: Select a Database
1515

16-
``` bash
17-
db new path/to/directory
18-
```
19-
This will create a new ZipponDB directory. Verify the creation by running:
20-
21-
``` bash
22-
db metrics
23-
```
24-
25-
## Step 3: Select a Database
26-
27-
Select a database by running:
16+
Once in the CLI, create a database by running:
2817
```bash
29-
db use path/to/ZipponDB
18+
db use path/to/dir
3019
```
3120

32-
Alternatively, set the `ZIPPONDB_PATH` environment variable to the path of a valid ZipponDB directory (containing DATA, BACKUP, and LOG directories).
21+
Alternatively, set the `ZIPPONDB_PATH` environment variable.
3322

34-
## Step 4: Attach a Schema
23+
## Step 3: Attach a Schema
3524

36-
Define a schema (see the next section for details) and attach it to the database by running:
25+
Define a [schema](/ZipponDB/Schema) and attach it to the database by running:
3726

3827
```bash
3928
schema init path/to/schema.txt
@@ -45,12 +34,14 @@ This will create the necessary directories and empty files for data storage. Tes
4534
schema describe
4635
```
4736

48-
## Step 5: Use the Database
37+
Alternatively, set the `ZIPPONDB_SCHEMA` environment variable.
38+
39+
## Step 4: Use the Database
4940

5041
Start using the database by sending queries, such as:
5142

5243
```bash
5344
run "ADD User (name = 'Bob')"
5445
```
5546

56-
You're now ready to explore the features of ZipponDB!
47+
[Learn more about ZiQL.](/ZipponDB/ziql/intro)

docs/Schema.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,26 @@ Comment (
4242

4343
*Note: The [] symbol preceding a type indicates an array of that type. For example, []User represents an array of User structs.*
4444

45-
## Schema Migration (Coming Soon)
45+
## Schema Migration - Not yet implemented
4646

4747
In future releases, ZipponDB will support schema updates, allowing you to modify existing structs or add new ones, and then apply these changes to your database. Currently, schema modifications are not possible once the database has been initialized.
4848

49+
I will add commands or query to add, delete and update struct in the schema. Maybe the schema will be a Struct itself with a schema like that:
50+
51+
```
52+
Struct (
53+
name: str,
54+
members: []Member,
55+
)
56+
57+
Member (
58+
name: str,
59+
type: int,
60+
)
61+
```
62+
63+
Like that can just do ZiQL qquery directly on it.
64+
4965
### Planned Migration Features
5066

5167
- Add new members to existing structs

docs/Single_file.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Single file
22

3-
TODO: In the future I will migrate into a single file database like SQLite.
4-
5-
## FileVar
6-
7-
A FileVar is a single value but saved in a file. This have a Blok, a position, a size and a type.
8-
For string, I will create something different I think, with a size max and a len, and can request more if needed.
3+
In the future I will migrate into a single file database like SQLite.
94

105
## FileBlok
116

127
A blok is like memory but for file. It has a starting point and a size and can hold entities or FileVar.
13-
Everything I will save will be linked into a Blok and I can create and delete it at will. The size it given in the config and can't change.
8+
Everything I will save will be linked into a Blok and I can create and delete them at will. The size is in the config and can't change.
149

15-
In SQLite, it is what they call a page I think. Similare thing.
10+
In SQLite, it is what they call it a page I think. Similare thing.
11+
12+
## FileVar
13+
14+
A FileVar is a single value but saved in a file. This have a Blok, a position, a size and a type.
15+
For string, I will create something different I think, with a size max and a len, and can request more if needed.

0 commit comments

Comments
 (0)