cycle / database

Database Abstraction Layer, Schema Introspection, Schema Generation, Query Builders
MIT License
54 stars 22 forks source link

Add supporting for array values in the `IN` and `NOT IN` operators using nested syntax #71

Closed roxblnfk closed 2 years ago

roxblnfk commented 2 years ago

Now you don't need to wrap an array value in the Parameter injection.

$database->select()
    ->from(['users'])
    ->where([
        'status' => [
            'IN' => ['active', 'blocked']
        ],
        'name' => [
            'NOT IN' => ['foo', 'bar']
        ],
    ]);
codecov[bot] commented 2 years ago

Codecov Report

Merging #71 (0f10202) into 2.x (41fe0c7) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##                2.x      #71   +/-   ##
=========================================
  Coverage     92.78%   92.79%           
- Complexity     1535     1537    +2     
=========================================
  Files            94       94           
  Lines          3897     3899    +2     
=========================================
+ Hits           3616     3618    +2     
  Misses          281      281           
Impacted Files Coverage Δ
src/Query/Traits/TokenTrait.php 93.33% <100.00%> (+0.12%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.