-
Notifications
You must be signed in to change notification settings - Fork 25
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
fix: createDatastorePredicate call was added #166
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.
You'll need to update snapshot tests as well.
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.
Rather than creating the predicate declaration then compiled declaration statements, could you combine them into something like.
const buttonUserCondition = createDataStorePredicate({ <PREDICATE LITERAL> });
Not sure what you are talking about here: can you provide examples? |
He suggesting changing this: const filterCriteriaObj = {
and: [
{
field: 'age',
operand: '10',
operator: 'gt',
},
{
field: 'lastName',
operand: 'L',
operator: 'beginsWith',
},
],
};
const filterCriteria = createDataStorePredicate(filterCriteriaObj); To this: const filterCriteria = createDataStorePredicate({
and: [
{
field: 'age',
operand: '10',
operator: 'gt',
},
{
field: 'lastName',
operand: 'L',
operator: 'beginsWith',
},
],
}); |
69c6c8c
to
d318ac6
Compare
That is a good suggestion, but we should do what's agreed with Hector and also that version gives more flexibility with what's passed to the function param. |
Description of changes:
The function call to createDataStorePredicate is added to convert predicate in object format to DateStore predicate format. An example of generated code:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.