Skip to content
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

Implementation of Function operand #175

Merged
merged 5 commits into from
Apr 22, 2019

Conversation

peter-gribanov
Copy link
Member

This is a implementation of the Function operand from #169 feature.

Use functions:

// DQL: SIZE(e.products) > 2
Spec::gt(Spec::SIZE('products'), 2);
// or
Spec::gt(Spec::fun('SIZE', 'products'), 2);
// or
Spec::gt(Spec::fun('SIZE', Spec::field('products')), 2);

Nested functions:

// DQL: TRIM(LOWER(e.email)) = :email
Spec::eq(Spec::TRIM(Spec::LOWER('email')), trim(strtolower($email)));
// or
Spec::eq(
    Spec::fun('TRIM', Spec::fun('LOWER', Spec::field('email'))),
    trim(strtolower($email))
);

@peter-gribanov peter-gribanov added this to the Release 1.0.0 milestone Apr 6, 2019
@peter-gribanov peter-gribanov merged commit 8e07ac2 into Happyr:1.0 Apr 22, 2019
@peter-gribanov peter-gribanov deleted the function branch October 28, 2019 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant