Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 1082ecd

Browse files
authored
Bugfix(grid) fix product grid query builder after optymise (#1866)
1 parent 7c537f8 commit 1082ecd

File tree

7 files changed

+31
-9
lines changed

7 files changed

+31
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## CHANGELOG FOR 1.1.x
2+
#### 1.1.9
3+
- bugfix [#1848](https://github.com/ergonode/backend/issues/1848) Long response times for product grid endpoint - change query after postgress query problem (rprzedzik)
4+
25
#### 1.1.8
36
- bugfix [#1848](https://github.com/ergonode/backend/issues/1848) Long response times for product grid endpoint (rprzedzik)
7+
48
#### 1.1.7
59
- bugfix [#1816](https://github.com/ergonode/backend/issues/1816) Fixed product audits (rprzedzik)
610

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"behatch/contexts": "^3.3",
7373
"dama/doctrine-test-bundle": "^6.6",
7474
"escapestudios/symfony2-coding-standard": "^3.10",
75+
"fakerphp/faker": "1.17.0",
7576
"friends-of-behat/symfony-extension": "^2.0.5",
7677
"friendsofphp/proxy-manager-lts": "^1.0",
7778
"infection/infection": "^0.17.5",

composer.lock

Lines changed: 22 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

module/product/src/Infrastructure/Grid/Builder/Query/DateAttributeDataSetQueryBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function addSelect(QueryBuilder $query, string $key, AbstractAttribute $a
5656
JOIN product_value pv ON pv.value_id = vt.value_id
5757
WHERE attribute_id = \'%s\'
5858
AND language = \'%s\'
59+
AND value ~ \'^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\'
5960
)',
6061
$key,
6162
$attribute->getId()->getValue(),

module/product/src/Infrastructure/Grid/Builder/Query/NumericAttributeDataSetQueryBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function addSelect(QueryBuilder $query, string $key, AbstractAttribute $a
5555
JOIN product_value pv ON pv.value_id = vt.value_id
5656
WHERE attribute_id = \'%s\'
5757
AND language = \'%s\'
58+
AND value ~ \'^\d+(\\.\\d+)?$\'
5859
)',
5960
$key,
6061
$attribute->getId()->getValue(),

module/product/src/Infrastructure/Grid/Builder/Query/PriceAttributeDataSetQueryBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function addSelect(QueryBuilder $query, string $key, AbstractAttribute $a
5656
JOIN product_value pv ON pv.value_id = vt.value_id
5757
WHERE attribute_id = \'%s\'
5858
AND language = \'%s\'
59+
AND value ~ \'^\d+(\\.\\d+)?$\'
5960
)',
6061
$key,
6162
$attribute->getId()->getValue(),

module/product/src/Infrastructure/Grid/Builder/Query/UnitAttributeDataSetQueryBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function addSelect(QueryBuilder $query, string $key, AbstractAttribute $a
5858
JOIN product_value pv ON pv.value_id = vt.value_id
5959
WHERE attribute_id = \'%s\'
6060
AND language = \'%s\'
61+
AND value ~ \'^\d+(\\.\\d+)?$\'
6162
)',
6263
$key,
6364
$attribute->getId()->getValue(),

0 commit comments

Comments
 (0)