-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add json
data type
#1051
Add json
data type
#1051
Conversation
…n on MySQL >= 8.0, fix bug in test_drop.
…ow precision to be specified in json queries, allow index use with json, test json only in MySQL>=8.0.
1ba7bfe
to
8008a7a
Compare
@guzman-raphael Would you remove the obsolete functionality as a separate PR, so that it's not tied to the introduction of JSON fields? |
@dimitri-yatsenko Makes sense. I've created a separate PR with the non-JSON updates. Once it is merged, I'll update this PR so that the diff is cleaner. |
datajoint/condition.py
Outdated
return ("NOT (%s)" if negate else "%s") % ( | ||
f"({f') {operator} ('.join(restrictions)})" | ||
) |
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.
return ("NOT (%s)" if negate else "%s") % ( | |
f"({f') {operator} ('.join(restrictions)})" | |
) | |
return f"{'NOT ' if negate else ''} (%s)" % f"){operator}(".join(restrictions)" |
json
type. Useful doc on querying with JSON_VALUE.json
type in MySQL >=8.0 sinceJSON_VALUE
approach is quite useful in returning with specific types, however, it was introduced in 8.x.json
as an alias forlongtext
+ check constraint usingJSON_VALID
. Due to how different the implementations are, MariaDB won't be supported in our implementation ofjson
type.longblob
(i.e. 4GB) per value.Known gaps:support for creating indexes. It is possible but there is more needed work to make it compatible withdescribe()
.Depends on #1052, #1055, #1073