Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add toml double/float/int support #61

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

BoyeGuillaume
Copy link
Collaborator

No description provided.

@Tran-Antoine Tran-Antoine changed the title fix: adding toml double/float/int support fix: add toml double/float/int support Feb 27, 2021
@Tran-Antoine
Copy link
Owner

Like we discussed there is still an issue at a lower level that prevents us from being able to use anything but Strings, we have to investigate how to fix that

@BoyeGuillaume
Copy link
Collaborator Author

BoyeGuillaume commented Mar 1, 2021

You mean that internally we cannot store anything but strings? Which represents an non-optimized memory usage. I believe we aren't really doing a gigantic database and therefore such issues aren't really relevant

@Tran-Antoine
Copy link
Owner

No that's not the issue I'm referring to. By lower level, I meant in the code. The problem comes from getDatabaseEntries which prevents us from being able to use anything but strings

@BoyeGuillaume
Copy link
Collaborator Author

This is the same issue. To store information we need to know how to store it. Like if i store a integer if will store 4 bytes. But i can also load this 4 bytes as if it was a string of 4 bytes. We therefore need to introduce a Varient type (type that can contain some objects such as Integer, String, etc...) and from there we will create a way to serialize/deserialize the Varient from the database. The issues with this approach are:

  • Require significant work
  • We will need to serialize the type as well as the data
  • Cannot do that with generic (as we need a way to serialize/deserialize => could work with an interface thought)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants