-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Validation and Schema #189
Comments
@Timu57 |
Hi @oCyex Sure, SleekDB does nothing schema related, so if you want to use another library to enforce a schema, you are free to do so SleekDB doesn't restrict you in any way 😁 |
@Timu57 Yeah! It's just I thought it was the perfect libraries to get inspired for what you wanted to do ;) |
Hi. I’m pretty new to this. Far to often the DB validation of values is based on the way it should store it, and not about what the value represents in real life. You will still be able to store 42 as a string in the variable “color”… and you will still have no idea how to render it, or if will be 42 forever or just today. Or is it even a color or an index to a color? Just my 2 cents. |
As pointed out by @daussho in #177 it is a good idea to implement a Schema feature to make validation with features like "unique" possible.
That schema could include many conditions to validate new documents before inserting them:
Interesting libraries are:
https://github.com/laravel/framework/tree/8.x/src/Illuminate/Validation
Documentation:
https://laravel.com/docs/8.x/validation
AND:
https://github.com/rakit/validation
Storing the keys is no longer required
@prashant-saxena had a great idea in #211 . Instead of saving the data as a key-value pair in a json-file we could just save the value. Then the data could look like this:
The text was updated successfully, but these errors were encountered: