-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
463 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder; | ||
|
||
use MongoDB\Builder\Aggregation\AndAggregation; | ||
use MongoDB\Builder\Aggregation\EqAggregation; | ||
use MongoDB\Builder\Aggregation\FilterAggregation; | ||
use MongoDB\Builder\Aggregation\GtAggregation; | ||
use MongoDB\Builder\Aggregation\LtAggregation; | ||
use MongoDB\Builder\Aggregation\NeAggregation; | ||
use MongoDB\Builder\Expression\ResolvesToArrayExpression; | ||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
|
||
final class Aggregation | ||
{ | ||
/** | ||
* This class cannot be instantiated. | ||
*/ | ||
private function __construct() | ||
{ | ||
} | ||
|
||
/** @param ResolvesToExpression|array|bool|float|int|object|string|null $expressions */ | ||
public static function and(array|bool|float|int|null|object|string ...$expressions): Aggregation\AndAggregation | ||
{ | ||
return new AndAggregation( | ||
$expressions, | ||
); | ||
} | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public static function eq( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
): Aggregation\EqAggregation { | ||
return new EqAggregation( | ||
$expression1, | ||
$expression2, | ||
); | ||
} | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public static function gt( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
): Aggregation\GtAggregation { | ||
return new GtAggregation( | ||
$expression1, | ||
$expression2, | ||
); | ||
} | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public static function lt( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
): Aggregation\LtAggregation { | ||
return new LtAggregation( | ||
$expression1, | ||
$expression2, | ||
); | ||
} | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public static function ne( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
): Aggregation\NeAggregation { | ||
return new NeAggregation( | ||
$expression1, | ||
$expression2, | ||
); | ||
} | ||
|
||
/** | ||
* @param ResolvesToArrayExpression|array|object|string $input | ||
* @param ResolvesToBoolExpression|array|bool|object|string $cond | ||
* @param ResolvesToBoolExpression|array|float|int|object|string|null $limit | ||
*/ | ||
public static function filter( | ||
array|object|string $input, | ||
array|bool|object|string $cond, | ||
string|null $as, | ||
array|float|int|object|string|null $limit, | ||
): Aggregation\FilterAggregation { | ||
return new FilterAggregation( | ||
$input, | ||
$cond, | ||
$as, | ||
$limit, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Aggregation; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
|
||
class AndAggregation implements ResolvesToBoolExpression | ||
{ | ||
/** @param list<ResolvesToExpression|array|bool|float|int|object|string|null> $expressions */ | ||
public array $expressions; | ||
|
||
/** @param ResolvesToExpression|array|bool|float|int|object|string|null $expressions */ | ||
public function __construct(array|bool|float|int|null|object|string ...$expressions) | ||
{ | ||
$this->expressions = $expressions; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Aggregation; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
|
||
class EqAggregation implements ResolvesToBoolExpression | ||
{ | ||
public array|bool|float|int|null|object|string $expression1; | ||
public array|bool|float|int|null|object|string $expression2; | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public function __construct( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
) { | ||
$this->expression1 = $expression1; | ||
$this->expression2 = $expression2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Aggregation; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToArrayExpression; | ||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
|
||
class FilterAggregation implements ResolvesToArrayExpression | ||
{ | ||
public array|object|string $input; | ||
public array|bool|object|string $cond; | ||
public string|null $as; | ||
public array|float|int|object|string|null $limit; | ||
|
||
/** | ||
* @param ResolvesToArrayExpression|array|object|string $input | ||
* @param ResolvesToBoolExpression|array|bool|object|string $cond | ||
* @param ResolvesToBoolExpression|array|float|int|object|string|null $limit | ||
*/ | ||
public function __construct( | ||
array|object|string $input, | ||
array|bool|object|string $cond, | ||
string|null $as, | ||
array|float|int|object|string|null $limit, | ||
) { | ||
$this->input = $input; | ||
$this->cond = $cond; | ||
$this->as = $as; | ||
$this->limit = $limit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Aggregation; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
|
||
class GtAggregation implements ResolvesToBoolExpression | ||
{ | ||
public array|bool|float|int|null|object|string $expression1; | ||
public array|bool|float|int|null|object|string $expression2; | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public function __construct( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
) { | ||
$this->expression1 = $expression1; | ||
$this->expression2 = $expression2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Aggregation; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
|
||
class LtAggregation implements ResolvesToBoolExpression | ||
{ | ||
public array|bool|float|int|null|object|string $expression1; | ||
public array|bool|float|int|null|object|string $expression2; | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public function __construct( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
) { | ||
$this->expression1 = $expression1; | ||
$this->expression2 = $expression2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Aggregation; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
|
||
class NeAggregation implements ResolvesToBoolExpression | ||
{ | ||
public array|bool|float|int|null|object|string $expression1; | ||
public array|bool|float|int|null|object|string $expression2; | ||
|
||
/** | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression1 | ||
* @param ResolvesToExpression|array|bool|float|int|object|string|null $expression2 | ||
*/ | ||
public function __construct( | ||
array|bool|float|int|null|object|string $expression1, | ||
array|bool|float|int|null|object|string $expression2, | ||
) { | ||
$this->expression1 = $expression1; | ||
$this->expression2 = $expression2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
use MongoDB\Builder\Expression\ResolvesToQueryOperator; | ||
use MongoDB\Builder\Query\AndQuery; | ||
use MongoDB\Builder\Query\ExprQuery; | ||
|
||
final class Query | ||
{ | ||
/** | ||
* This class cannot be instantiated. | ||
*/ | ||
private function __construct() | ||
{ | ||
} | ||
|
||
/** @param ResolvesToQueryOperator|array|object $query */ | ||
public static function and(array|object ...$query): Query\AndQuery | ||
{ | ||
return new AndQuery( | ||
$query, | ||
); | ||
} | ||
|
||
/** @param ResolvesToExpression|array|bool|float|int|object|string|null $expression */ | ||
public static function expr(array|bool|float|int|null|object|string $expression): Query\ExprQuery | ||
{ | ||
return new ExprQuery( | ||
$expression, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Query; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToBoolExpression; | ||
use MongoDB\Builder\Expression\ResolvesToQueryOperator; | ||
|
||
class AndQuery implements ResolvesToBoolExpression | ||
{ | ||
/** @param list<ResolvesToQueryOperator|array|object> $query */ | ||
public array $query; | ||
|
||
/** @param ResolvesToQueryOperator|array|object $query */ | ||
public function __construct(array|object ...$query) | ||
{ | ||
$this->query = $query; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
/** | ||
* THIS FILE IS AUTO-GENERATED. ANY CHANGES WILL BE LOST! | ||
*/ | ||
|
||
namespace MongoDB\Builder\Query; | ||
|
||
use MongoDB\Builder\Expression\ResolvesToExpression; | ||
|
||
class ExprQuery implements ResolvesToExpression | ||
{ | ||
public array|bool|float|int|null|object|string $expression; | ||
|
||
/** @param ResolvesToExpression|array|bool|float|int|object|string|null $expression */ | ||
public function __construct(array|bool|float|int|null|object|string $expression) | ||
{ | ||
$this->expression = $expression; | ||
} | ||
} |
Oops, something went wrong.