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

Feature/Added Criteria Builder. #22

Merged
merged 1 commit into from
Feb 11, 2021
Merged

Conversation

othercodes
Copy link
Owner

Fluent interface to build Criteria:

$criteria = (new CriteriaBuilder())
    ->filterEqual('name', 'Jules')
    ->filterNotEqual('surname', 'Wallace')
    ->filterGreaterThan('height', 1)
    ->filterLessThan('weight', 100)
    ->filterGreaterOrEqualThan('age', 18)
    ->filterLessOrEqualThan('age', 50)
    ->filterIn('address.state', ['FL', 'NY'])
    ->filterNotIn('address.zip', [10, 11, 12, 13])
    ->filterLike('job.title', '%Gangster%')
    ->orderedBy('name')
    ->orderedType('desc')
    ->withLimit(50)
    ->withOffset(100)
    ->build();

// pass Criteria to repository. 
$repository->match($criteria);

@codecov
Copy link

codecov bot commented Feb 11, 2021

Codecov Report

❗ No coverage uploaded for pull request base (develop@d794f85). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop      #22   +/-   ##
==========================================
  Coverage           ?   90.43%           
  Complexity         ?      176           
==========================================
  Files              ?       24           
  Lines              ?      387           
  Branches           ?        0           
==========================================
  Hits               ?      350           
  Misses             ?       37           
  Partials           ?        0           
Flag Coverage Δ Complexity Δ
unittests 90.43% <0.00%> (?) 0.00% <0.00%> (?%)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d794f85...42ad413. Read the comment docs.

@othercodes othercodes merged commit e4a4883 into develop Feb 11, 2021
@othercodes othercodes deleted the feature/CriteriaBuilder branch February 11, 2021 15:32
othercodes added a commit that referenced this pull request Feb 11, 2021
@othercodes othercodes mentioned this pull request Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant