-
Notifications
You must be signed in to change notification settings - Fork 64
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
JSON Support 2 #108
JSON Support 2 #108
Conversation
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.
This looks really good/close.
I'd love to do another PR that adds some method to the criteria for JSON specific queries! Like contains, looking in keys, etc. That'd be sweet. But can definitely come later :)
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 great! :D
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.
Actually I just realized I don’t think we have any specs for querying Json. Could you add some specs for stuff like equals?
I don't get notified for updates/force pushes so can you ping me when you're ready for me to take another look? |
Weird. Yeah, I'm getting ready to work on this now, so it'll be here in a bit. |
@paulcsmith this adds a simple example on doing a where query with the json. I'll do a new PR to add in fancy query with json. |
Looks great! Just needs a rebase and then I'll merge it in! |
@paulcsmith nothing to rebase. |
I'm not great at git. Maybe I'm missing something? |
Ok...maybe GitHub is having issues lol. Because I still see that message that there are conflicts. Can you go ahead and merge it since I can't 🤣 |
This replaces #48 with some updates
ColumnDefaultType
.One thing to note about this type restriction is that in pr 48 it was set to
Object
, this meant you could set default values on json columns super easy likedefault: {"number" => 1}
. That was nice, but it also meant you could set pretty much anything there likedefault: HTTP::Params
since as long as it was of typeObject
, it would work.Eventually I would like to open this up, but in keeping with the type safe tradition, we can start with a rough version, and then slowly improve it over time.