Skip to content

Commit

Permalink
Commit generated classes
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Sep 26, 2023
1 parent 883a4a4 commit 11e4854
Show file tree
Hide file tree
Showing 14 changed files with 463 additions and 0 deletions.
110 changes: 110 additions & 0 deletions src/Builder/Aggregation.php
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,
);
}
}
22 changes: 22 additions & 0 deletions src/Builder/Aggregation/AndAggregation.php
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;
}
}
28 changes: 28 additions & 0 deletions src/Builder/Aggregation/EqAggregation.php
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;
}
}
35 changes: 35 additions & 0 deletions src/Builder/Aggregation/FilterAggregation.php
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;
}
}
28 changes: 28 additions & 0 deletions src/Builder/Aggregation/GtAggregation.php
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;
}
}
28 changes: 28 additions & 0 deletions src/Builder/Aggregation/LtAggregation.php
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;
}
}
28 changes: 28 additions & 0 deletions src/Builder/Aggregation/NeAggregation.php
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;
}
}
38 changes: 38 additions & 0 deletions src/Builder/Query.php
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,
);
}
}
22 changes: 22 additions & 0 deletions src/Builder/Query/AndQuery.php
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;
}
}
20 changes: 20 additions & 0 deletions src/Builder/Query/ExprQuery.php
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;
}
}
Loading

0 comments on commit 11e4854

Please sign in to comment.