-
Notifications
You must be signed in to change notification settings - Fork 1
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
Change on query object schema #10
Comments
I see what you're saying. I'd like {
"type": "STANDARD",
"field": "name",
"match": "Bob"
} The If anything, writes should have their own types, values being |
@chen-factual I see, so the reason I think keeping {
"type": "RAW",
"table": "example-table",
"query": {
"field": "field1",
"match": "baz"
},
"upsert": {
"$set": {
"field2": "boo",
"field3": "bar"
},
"$setOnInsert": {
"field1": "baz",
"field2": "boo",
"field3": "bar"
}
}
} So in this case, |
I can see a corner use case for it, but in the interest of simplifying things I'd be glad if we enforce RAW to apply to everything, instead of selectively to just one or the other. |
When I'm implementing the write operation, I encountered some problems and thought that we may need change the query object schema:
0.) Since the write needs the type, query and option sometime, it's very confusing if we still allow
type
to be placed in the top level of query object. We should just put thetype
in thequery
,insert
orupdate
, they can specify the type just forquery
orwrite
.1.) To make the first level keys of query object to be clear, maybe we should put
insert
andupdate
into a key calledwrite
.Here is the proposed format after the changes:
@chen-factual what do you think about this?
The text was updated successfully, but these errors were encountered: