Update Docs

Shoud added them on docs and added images
This commit is contained in:
Adrien Bouvais 2024-11-26 18:59:12 +01:00
parent cc32eff1da
commit 7e5abcedea
7 changed files with 17 additions and 213 deletions

View File

@ -12,7 +12,7 @@
- [X] File engine
#### v0.2 - Usable
- [ ] Relationships
- [~] Relationships
- [ ] Arrays
- [X] Custom data file
- [X] Date
@ -25,7 +25,7 @@
- [ ] Dump/Bump data
- [ ] Recovery
- [ ] Better CLI
- [ ] Linked query
- [ ] Linked query
### Beta
#### v0.4 - Usability

BIN
docs/images/logo.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -2,6 +2,21 @@ site_name: ZipponDB Documentation
site_url: https://MrBounty.github.io/ZipponDB/
theme:
name: readthedocs
logo: images/logo.jpeg
collapse_navigation: true
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
markdown_extensions:
- attr_list
- md_in_html

File diff suppressed because one or more lines are too long

View File

@ -1,58 +0,0 @@
import subprocess
from faker import Faker
import random
from tqdm import tqdm
fake = Faker()
def random_array():
length = random.randint(-1, 10)
scores = [random.randint(-1, 100) for _ in range(length)]
return f"[{' '.join(map(str, scores))}]"
def run(process, command):
"""Sends a command to the Zig process and returns the output."""
process.stdin.write('run "' + command + '"\n')
process.stdin.flush()
output = ""
char = process.stdout.read(1) # Read one character
while char:
if char == "\x03": # Check for ETX
break
output += char
char = process.stdout.read(1)
return output.strip()
# Start the Zig binary process once
for _ in tqdm(range(1000)):
process = subprocess.Popen(
["zig-out/bin/ZipponDB"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True # For easier string handling
)
for _ in range(1000):
query = "ADD User ("
query += f"name = '{fake.name()}',"
query += f"age = {random.randint(0, 100)},"
query += f"email = '{fake.email()}',"
query += f"scores={random_array()},"
query += f"friends = [],"
query += f"bday={fake.date(pattern='%Y/%m/%d')},"
query += f"last_order={fake.date_time().strftime('%Y/%m/%d-%H:%M:%S.%f')},"
query += f"a_time={fake.date_time().strftime('%H:%M:%S.%f')}"
query += f")"
run(process, query)
# Ensure we always close the process, even if an error occurs
process.stdin.write("quit\n")
process.stdin.flush()
process.terminate()
process.wait()