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

Made it possible to use JSON fields for data in the database #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ilikeintegratedcircuit
Copy link

Changes have been made to implement the ability to use JSON fields to store data in the database. It also solves the problem of converting data when saving and reading, and also preserves the original data types (the number does not become a string)

I made for this:
created a model with JSON data field

created option isDataFieldText in SequelizeStoreOptions, for connect model with JSON data field;
new model has been connected

created converting and reverse converting session data to string or to JSON

created a model with JSON data field

created option isDataFieldText in SequelizeStoreOptions, for connect model with JSON data field;
new model has been connected

created converting and reverse converting session data to string or to JSON
@ilikeintegratedcircuit
Copy link
Author

Changes have been made to implement the ability to use JSON fields to store data in the database. It also solves the problem of converting data when saving and reading, and also preserves the original data types (the number does not become a string)

@mweibel
Copy link
Owner

mweibel commented Dec 4, 2020

I tend to disagree with this PR as I don't see the benefit much. JSON fields are not supported in all databases and connect-session-sequelize converts between the two representations without issue.
Unless I see more support for this change I'm not gonna merge this.

@ilikeintegratedcircuit
Copy link
Author

ilikeintegratedcircuit commented Dec 4, 2020 via email

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