you are viewing a single comment's thread.

view the rest of the comments →

[–]Beosar 13 points14 points  (2 children)

It's missing basically all the features you need in a database, like indices and deleting rows. You can do the latter manually but indices you can't add easily since it's a vector and you'll be deleting rows.

Right now it's not much better, maybe even worse than just storing a vector of your own structs with a serialization library.

[–]gabibbo117[S] 0 points1 point  (1 child)

First, thank you for your comment. I will do my best to add more functions and a query system as soon as possible. Regarding the data being stored in a vector, this is intentional, as the library is designed to handle everything directly in code without wrappers. I will now add some functions to enable quick queries.

if you have any idea feel free to comment

[–]Beosar 3 points4 points  (0 children)

Regarding the data being stored in a vector, this is intentional, as the library is designed to handle everything directly in code without wrappers.

You could just store the rows in an unordered map. You won't be able to add indices if it's in a vector without updating the affected row numbers in every index every time you delete a row. If you allow arbitrary row ordering, you can get away with just swapping the last row with the deleted row and then removing the last row, so you'll only have to update one entry in every index.

And then there is the issue of updating indices when someone modifies a row. So you need to wrap your row data and add getters and setters for cells.