Update readme
This commit is contained in:
parent
87e11188d2
commit
07f09e463d
35
README.md
35
README.md
@ -14,33 +14,29 @@ From here, you can create a new engine by running `schema build`. It will get th
|
||||
using zig that the CLI will then use to manipulate data. You then interact with the engine by using `run "My query go here"` or
|
||||
by directly using the engine binary.
|
||||
|
||||
## Why Zippon ?
|
||||
### Why Zippon ?
|
||||
|
||||
I first started ZipponDB to learn, but I think that in order to learn, you need to build something real, so I chose to do a database
|
||||
as I try to become an expert in it.
|
||||
|
||||
Now for Zippon advantages:
|
||||
- Open-source and 100% in Zig with 0 dependencies
|
||||
- Open-source and written 100% in Zig with 0 dependency
|
||||
- Relational database
|
||||
- Small, fast and implementable everywhere
|
||||
|
||||
# Declare a schema
|
||||
|
||||
ZipponDB need a schema to work. A schema is a way to define how your data will be store. Compared to SQL, you can see it as a
|
||||
file where you declare all table name, columns name, data type and relationship. But here you declare struct. A struct have a name and
|
||||
members. A member is one data or link and have a type associated. Here a simple example for a user:
|
||||
ZipponDB need a schema to work. A schema is a way to define how your data will be store.
|
||||
|
||||
Compared to SQL, you can see it as a file where you declare all table name, columns name, data type and relationship.
|
||||
|
||||
But here you declare struct. A struct have a name and members. A member is one data or link and have a type associated. Here a simple example for a user:
|
||||
|
||||
```
|
||||
User (
|
||||
name: str,
|
||||
email: str,
|
||||
best_friend: User,
|
||||
friends: []User,
|
||||
)
|
||||
```
|
||||
|
||||
In this example each user have a name and email as a string. But also one best friend as a link. [] mean that there is a
|
||||
list of this value. Note that all value can be null exept list, they can be empty.
|
||||
In this example each user have a name and email as a string. But also one best friend as a link.
|
||||
|
||||
Here a more advance example with multiple struct:
|
||||
```
|
||||
@ -49,9 +45,9 @@ User {
|
||||
email: str,
|
||||
friends: []User,
|
||||
posts: []Post,
|
||||
liked_post: []Post,
|
||||
liked_posts: []Post,
|
||||
comments: []Comment,
|
||||
liked_com: []Comment,
|
||||
liked_coms: []Comment,
|
||||
}
|
||||
|
||||
Post {
|
||||
@ -72,13 +68,11 @@ Comment {
|
||||
}
|
||||
```
|
||||
|
||||
Note: data not yet implemented.
|
||||
Note: [] are list of value.
|
||||
|
||||
# ZipponQL
|
||||
|
||||
Zippon have it's own query language. Why ? Idk, I wanted to do it.
|
||||
|
||||
The language itself is fairly easy in my opinion. Here the basic:
|
||||
Zippon have it's own query language. Here the keys point to remember:
|
||||
|
||||
- {} Are filters
|
||||
- [] Are how much; what data
|
||||
@ -130,12 +124,11 @@ Get all user that are friends with an Adrien
|
||||
|
||||
`ADD User ( name = 'Adrien', email = 'email', age = 40 )`
|
||||
|
||||
|
||||
# Integration
|
||||
|
||||
For now there is only a python intregration, but because it is just 2-3 command, it is easy to implement with other language.
|
||||
|
||||
## Python
|
||||
### Python
|
||||
|
||||
```python
|
||||
import zippondb as zdb
|
||||
@ -152,6 +145,7 @@ for user in users:
|
||||
|
||||
# Roadmap
|
||||
|
||||
[X] CLI
|
||||
[ ] Beta without link
|
||||
[ ] Relationships/links
|
||||
[ ] Multi threading
|
||||
@ -161,3 +155,4 @@ for user in users:
|
||||
[ ] Dump/Bump data
|
||||
[ ] In memory option
|
||||
[ ] Archives
|
||||
[ ] Date value type
|
||||
|
Loading…
x
Reference in New Issue
Block a user