-
Notifications
You must be signed in to change notification settings - Fork 3
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: entity query conditions #385
Conversation
Between should be an array. between: [start,end] |
Do the types properly protect from having two subsequent startsWith, between, etc? |
Yeah. The query key condition can only be on the current head of the recursive progressive query key type. Also only on sort attributes. |
I wonder if we should adopt mongo's syntax so that we are not inventing as much. They use $gt, $gte, etc. this same query language can then be used in filter expressions too. https://www.mongodb.com/docs/manual/tutorial/query-documents/ |
Alright, I've been thinking about this. At first I didn't think we needed any special characters because there is no ambiguity, and then I thought about adding BUT, if we want to support a DSL for filtering logic and not an expression, we'll need // val < 100 && (begins_with(val2, "a") || begins_with(val2, "b"))
{
val: { $lt: 100 },
$or: [{
val2: { $beginsWith: "a" }
}, {
val2: { $beginsWith: "b" }
}[
} I'll make the change
|
updated docs: functionless/eventual-website#16 |
Adds the ability to provide query conditions in place of concrete key attributes for the sort key.
Caveats:
["name", "age"]
,{ name: "sam", age: { $gt: 30 } }
- greatThan 30 will use string based "30" and not numericTODO: add documentation