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
feat: add an option to control the behavior of null
in JSON attributes
#16861
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 tasks
ephys
changed the title
feat: add options controlling the behavior of
feat: add option controlling the behavior of Dec 11, 2023
null
in JSON attributesnull
in JSON attributes
ephys
changed the title
feat: add option controlling the behavior of
feat: add an option to control the behavior of Dec 11, 2023
null
in JSON attributesnull
in JSON attributes
WikiRik
previously approved these changes
Dec 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, assuming tests pass
WikiRik
approved these changes
Dec 12, 2023
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Dec 12, 2023
papandreou
added a commit
to papandreou/sequelize
that referenced
this pull request
Dec 19, 2023
v7.0.0-alpha.34 * tag 'v7.0.0-alpha.34': (94 commits) v7.0.0-alpha.34 feat!: rename association classes to prevent conflicts with decorators (sequelize#16513) meta: add unit test for ARRAY(UUID) (sequelize#16841) fix: correct link to data types docs (sequelize#16674) feat: add support for `sql` tag & functions in `sequelize.query` (sequelize#16863) feat: add an option to control the behavior of `null` in JSON attributes (sequelize#16861) meta: update dependency nx to v17.2.1 (sequelize#16862) meta: update sequelize AUTHORS (sequelize#16856) meta: lock file maintenance (sequelize#16859) meta: update dependency typedoc-plugin-mdn-links to v3.1.7 (sequelize#16857) meta: update dependency markdownlint-cli to v0.38.0 (sequelize#16854) meta: update dependency nx to v17.2.0 (sequelize#16853) meta: update dependency ts-node to v10.9.2 (sequelize#16852) meta: update dependency @types/snowflake-sdk to v1.6.20 (sequelize#16850) meta: update dependency @types/snowflake-sdk to v1.6.19 (sequelize#16849) meta: update actions/stale action to v9 (sequelize#16847) meta: update dependency snowflake-sdk to v1.9.2 (sequelize#16846) meta: update dependency @types/node to v20.10.4 (sequelize#16845) meta: add tests to verify that showConstraints filters on schema (sequelize#16785) meta: update sequelize AUTHORS (sequelize#16781) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Description Of Change
Closes sequelize/website#578
This PR adds the ability to chose how the JavaScript
null
primitive is mapped in a JSON column, by configuring the newnullJsonStringification
global option.json
mode (default, v7 behavior): The value is stringified as a JSON valuesql
mode (v6 behavior): The value is stringified as the SQL NULLexplicit
mode: The value is rejected. The user must useSQL_NULL
orJSON_NULL
explicitly.This only impacts the top level value of JSON columns, as that is the only place where an ambiguity is present.
The new
SQL_NULL
andJSON_NULL
values can be used to compare against the attribute too, as an alternative to having to useOp.is
andOp.eq
explicitly.