Open jorbascrumps opened 2 years ago
Resolves #39
Queries can still be performed without explicitly setting an operator:
Entity::where('active', true)->get();
Or queries can have an operator specified:
Entity::where('created_at', '>', Carbon::now())->get();
Queries can even use a combination:
Entity::where('published', true) ->where([ ['numComments', '>', 1], 'author', 8) ]) ->limit(10) ->get();
If an operator is not specified its value is set to = by default. Supported operators are: =, <, >, <=, >=, <>, !=, <=>.
=
<
>
<=
>=
<>
!=
<=>
Services will now have access to the column, operator, and value that has been set in the query:
column
operator
value
public function getEntities(array $where) { foreach ($where as [$column, $operator, $value]) { // ... } }
@TZK- Any thoughts on this?
Resolves #39
Queries can still be performed without explicitly setting an operator:
Or queries can have an operator specified:
Queries can even use a combination:
If an operator is not specified its value is set to
=
by default. Supported operators are:=
,<
,>
,<=
,>=
,<>
,!=
,<=>
.Services will now have access to the
column
,operator
, andvalue
that has been set in the query: