connect-session-sequelize
connect-session-sequelize copied to clipboard
Made it possible to use JSON fields for data in the database
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
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 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.
Good afternoonI agree, that not all databases support JSON fields, but many do. My version retains the user's choice. Now there is a problem with the numbers obtained. They return as string and this causes errors in strict comparisons (===) 04.12.2020, 11:28, "Michael Weibel" [email protected]: 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.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.