58 Commits

Author SHA1 Message Date
57a9eecdb3 Renamed members of AdditionalData 2024-11-30 09:49:54 +01:00
7f27557ca2 Fix parsing array
Before if the array is [ 1 ] I get [ 0, 1, 0] because I get 2 empty
string that when I try to make into int, it become 0
2024-11-29 21:20:12 +01:00
3f53da5220 Making link_array working, now can do query with filter for array of ofther struct 2024-11-28 19:20:44 +01:00
08cae48cbc Added a writeEntityTable and fixed date and time 2024-11-24 22:26:54 +01:00
1333b75981 Dont trow and error on basic relationship query 2024-11-24 20:10:21 +01:00
bf1f5916d7 Can now ADD using a filter 2024-11-24 16:55:54 +01:00
ceab51da27 NewData map now use ConditionValue 2024-11-24 16:26:26 +01:00
23e8ed8709 Changed a bit how the memory work
Now SchemaEngine have an arena at the root of the file. So UUIDFileIndex
can be as big as we want. The idea is nice, maybe I will use it for the
FileEngine too.
2024-11-22 11:03:39 +01:00
3f5c929a11 Big memory improvement
Started to use fixed buffer at the root of each file. I like that
because that mean I can estimate the amount of memory that the app use.

The only thing that still use an non fixed allocator is the
UUIDFileIndex, but I dont like it. I think it should also use a fixed
lenght buffer. But then how can I be sure it is enough ? :/

I mean I get it, I need an allocator here. But if this is the only place
I use one, this a shame
2024-11-20 23:52:36 +01:00
979690fec4 IN filter working
Now if I do like GRAB User { best_friends IN {name = 'Bob'}} it should
work

At least now the condition value is a hashmap with key as UUID.
2024-11-17 21:52:11 +01:00
65ba0263cc Condition value now can have a HashMap of UUID/void 2024-11-17 18:11:54 +01:00
303dc81e2a Created an unused UUIDFileIndex
Created a RadixTree but it is too slow and doest provide that much
reduced memory, mostly because I did it badly. So I will juste use a
small wrapper around an AutoHashMap UUID usize
2024-11-17 00:11:34 +01:00
ef84200b34 Parsing filter can now parse sub filter, waiting to be use with the parsing to find relationship 2024-11-14 20:39:04 +01:00
6e7d1d150c Pass test with added stuffs for relationship 2024-11-13 22:44:27 +01:00
5e9c64caf6 Removed useless code 2024-11-12 21:18:19 +01:00
91b1f61e66 Working new SchemaEngine 2024-11-10 17:10:42 +01:00
e1c957b3b6 Started cleaning by creating a SchemaEngine 2024-11-10 11:38:37 +01:00
65be757440 Added multithreading to update 2024-11-06 16:01:55 +01:00
96e77a5ad4 Removed last trace of null 2024-11-04 22:57:19 +01:00
b12116c005 Removed uuid_file_index 2024-11-04 22:52:19 +01:00
3539dd685c Fix, perf ect
- Added a new data type self, that represent the id of the intity itself
- Fixed multi threading for parsing, now each thread use it's own writer
and I concat them at the end
- Added a schemaStruct id to the list
- Other fixe and stuff to go with the rest

New step, multi threading for all function then finally relationship
2024-11-03 19:18:25 +01:00
dba73ce113 Started to use fixed lenght alloc for performance
For very importatnt stuff like the writter that write data when parsing,
started to use fixed length because it take the majority of the time to
write, not to parse =/

Gonna need to improve that
2024-11-02 22:12:47 +01:00
aaa1cb2589 Added bach updateEntities using zid 2024-11-02 00:22:13 +01:00
0920927bc3 Removed sendUUIDs
Removed the different sendUUIDs and sendUUID function. new writeEntity
use a buffer to write inside like the other stuffs.
2024-11-01 22:23:04 +01:00
a20a60e566 Delete Entities now use ZipponData
Also stopped to parse then delete, now I parse and delete at the same
time for perf issue
2024-11-01 21:17:31 +01:00
f5a692558b Fixed the bug with additional data 2024-11-01 20:22:37 +01:00
5e1ac7a0d7 Parse and write at the same time
Created a new function to replace parseAndFindUUIDWithFilter.

Now it parse the file, evaluate with the filter and write directly to a
buffer. There is no UUID that is return, then file are parse again.
Should be a huge perf improve.

Some bugs with additionData tho, got a name: "<UUID>" =(
2024-11-01 20:17:45 +01:00
aff8fac0af FileEngine struct_array no longer an ArrayList
Started to use toOwnedSlice to replace members that are arrayList
2024-11-01 12:31:46 +01:00
dbf5a255a9 writeEntity working with new ZipponData package 2024-10-30 23:50:37 +01:00
294d4f7a2c Condition with index instead of member_name
Condition now store the index of the value in the file instead of the
member_name. So when I parse, I can just use the list array []Data and
the index to compare both value
2024-10-27 22:34:17 +01:00
304ec89167 Put back all test
I removed some test while implementing the new Filter
2024-10-27 22:17:15 +01:00
2a946eafd0 Working new filter parse
Now the parseFilter function return a Filter struct.

It is a tree of Condition and Logic operator  that will then be use when
parsing row. Need to do the evaluate function with the []Data and test
some error
2024-10-27 21:56:57 +01:00
334c738ac1 New Filter start to work
Changing how condition are handle to create a tree of condition to only
parse once.

So far the basic work, need more testing.
2024-10-27 19:55:07 +01:00
debc646738 Moved the custom types to a library 2024-10-27 12:59:28 +01:00
9d39d47c3b Removed some test and fixed some synthax 2024-10-26 13:47:52 +02:00
9c36fec517 Removed duplicate code
Changed the expected new value in parseNewData to remove code duplicate
2024-10-22 00:29:01 +02:00
696498d7ed Removed duplicate code
Changed how I check data type in parseCondition to prevent code
duplicate
2024-10-22 00:20:25 +02:00
2b9ad08abf Cleaned ZiQlParser
Removed 4 members to be variable, includding; state, struct_name, action
and additional_data.

Also make it so it only return ZipponEError
2024-10-22 00:03:38 +02:00
6b1d3d7495 Renamed id and id_array to link and link_array 2024-10-20 17:36:05 +02:00
34688a0180 Changed a bit how log work 2024-10-20 09:50:44 +02:00
a6a3c092cc Added logging, all Token use the same Loc 2024-10-20 01:35:12 +02:00
d851c8f908 DELETE UPDATE and ADD now send the list of affected uuid 2024-10-19 18:43:39 +02:00
6bcb369cbc Date, clean and errors
Added the datatype date, time and datetime

Moved all custom erros to a single file

Cleaned code to be more readable and created some small utils

Other stuffs that I dont recall. Basically preparing for the
relationship implementation
2024-10-19 14:42:13 +02:00
4069c7d85b Back to CLI in a loop 2024-10-17 01:49:54 +02:00
2b1deca452 Cleaning session
Removed the loop for the CLI, now just take some argument using the
binary. May come back to while loop if I need to keep like the file
engine between session. To run query in parallel.

Moved printError and send to utils and removed duplicate of them.

Organized FileEngine better.

Put the function that convert string to value in a seperate file.

Fix some synthax and make it smaller. Removed unused functions too
2024-10-16 22:36:21 +02:00
29af5a7ac0 Start cleaning before working one 0.2 2024-10-16 20:26:40 +02:00
04263493db Fixed some memory errors and synthax 2024-10-13 23:38:50 +02:00
68e91a62fd Clean a bit ZiQL parser and add condition check
Added a check at the end of parse Condition to check if the condition is
valid. Like < between string is not for example.

Also removed the state send_all to check inside filter_and_send instead
so update and delete can do the same.

And some small bugs/erros
2024-10-13 13:30:30 +02:00
e45d8579a9 Added the db metrics, use and init command
Now the DataEngine is deinit and init again everytime the user swap
database using db use. If a db is not selected, it will display an error
2024-10-13 11:26:44 +02:00
ac4186529d Implement send all and send JSON
Now send the JSON using the additional data.

Also implemented the empty filter and the no filter like GRAB User {}
and GRAB User
2024-10-12 19:02:23 +02:00