-
Notifications
You must be signed in to change notification settings - Fork 30
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
Simplify.... #38
Comments
Not sure about this. Let's ask @neovintage and @Thyra |
@neovintage flash plugin would need modifying a little. He'd need to ask the author to add a flash key to their session schema for his flash object. But that wouldn't be that bad. |
Phew, that's a difficult question. I don't think it would really make such a big difference for us: There would be less macros, but the methods for managing primitive types are still needed; we don't really drop anything, we just rearrange. |
Thanks for considering this. I know what you mean about the j-word thing... however the schema does give you one place to look when you want to see what is being stored. It makes it self documenting and enables you to have default values etc. Good luck with the decision... |
Do you think there is a reasonable way to switch to this new structure while somewhat keeping backward compatibility? I'm thinking a default schema where primitive arrays are already defined (so that |
That makes perfect sense. |
my sessions table looks like this lol:
I would like a "define your own storage object" version. Maybe the |
After reading over the code, I can't help thing kemal-session could be significantly simplified by just saving a single object. That is to say, removing all the strings, int32, int64, floats, bools etc.
You could tell users they had to define a storable object. They could then define the structure of the data they want to save. I typically want to save a user, so as long as my user has a to_json method (which is probable if I run an endpoint on it) I can the just nest in as a sub object.
ie
This would remove many of the current macros and possibly make it easier for developers to add other store engines.
What do you think?
The text was updated successfully, but these errors were encountered: