Skip to content

Commit

Permalink
Fix type for $limit
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Oct 2, 2023
1 parent d4e53d4 commit c789074
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
5 changes: 3 additions & 2 deletions generator/config/expressions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ function typeFieldPath(string $resolvesTo): array

return [
'null' => ['scalar' => true, 'types' => ['null']],
'number' => ['scalar' => true, 'types' => ['int']],
'decimal' => ['scalar' => true, 'types' => ['float']],
'int' => ['scalar' => true, 'types' => ['int', BSON\Int64::class]],
'number' => ['scalar' => true, 'types' => ['int', BSON\Int64::class]],
'decimal' => ['scalar' => true, 'types' => ['float', BSON\Decimal128::class]],
'string' => ['scalar' => true, 'types' => ['string']],
'boolean' => ['scalar' => true, 'types' => ['bool']],

Expand Down
3 changes: 2 additions & 1 deletion generator/config/stages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
- name: sort
type: stage
args:
# @todo should generate be a map, not a list
- name: sortSpecification
type: number # should be an enum PHPLIB-1269
isVariadic: true
- name: limit
type: stage
args:
- name: limit
type: resolvesToInt
type: int
- name: group
type: stage
encode: object
Expand Down
9 changes: 4 additions & 5 deletions src/Builder/Stage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/Builder/Stage/LimitStage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/Builder/Stage/SortStage.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c789074

Please sign in to comment.