Bump flow-bin from 0.83.0 to 0.91.0 (#5302)
* Bump flow-bin from 0.83.0 to 0.91.0 Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.83.0 to 0.91.0. - [Release notes](https://github.com/flowtype/flow-bin/releases) - [Commits](https://github.com/flowtype/flow-bin/compare/v0.83.0...v0.91.0) Signed-off-by: dependabot[bot] <support@dependabot.com> * fix flow issue
This commit is contained in:
committed by
Florent Vilmart
parent
30aa1ded1d
commit
3851641b5a
6
package-lock.json
generated
6
package-lock.json
generated
@@ -4103,9 +4103,9 @@
|
||||
}
|
||||
},
|
||||
"flow-bin": {
|
||||
"version": "0.83.0",
|
||||
"resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.83.0.tgz",
|
||||
"integrity": "sha512-1K83EL/U9Gh0BaXPKkZe6TRizSmNSKx9Wuws1c8gh7DJEwiburtCxYT+4o7in1+GnNEm3CZWnbnVV8n9HMpiDA==",
|
||||
"version": "0.91.0",
|
||||
"resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.91.0.tgz",
|
||||
"integrity": "sha512-j+L+xNiUYnZZ27MjVI0y2c9474ZHOvdSQq0Tjwh56mEA7tfxYqp5Dcb6aZSwvs3tGMTjCrZow9aUlZf3OoRyDQ==",
|
||||
"dev": true
|
||||
},
|
||||
"follow-redirects": {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"deep-diff": "1.0.2",
|
||||
"eslint": "^5.0.0",
|
||||
"eslint-plugin-flowtype": "^3.0.0",
|
||||
"flow-bin": "0.83.0",
|
||||
"flow-bin": "0.91.0",
|
||||
"gaze": "1.1.3",
|
||||
"husky": "^1.0.0-rc.13",
|
||||
"jasmine": "3.1.0",
|
||||
|
||||
@@ -1963,12 +1963,14 @@ export class PostgresStorageAdapter implements StorageAdapter {
|
||||
const wherePattern =
|
||||
where.pattern.length > 0 ? `WHERE ${where.pattern}` : '';
|
||||
const qs = `SELECT count(*) FROM $1:name ${wherePattern}`;
|
||||
return this._client.one(qs, values, a => +a.count).catch(error => {
|
||||
if (error.code !== PostgresRelationDoesNotExistError) {
|
||||
throw error;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
return this._client
|
||||
.one(qs, values, a => +a.count)
|
||||
.catch(error => {
|
||||
if (error.code !== PostgresRelationDoesNotExistError) {
|
||||
throw error;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
distinct(
|
||||
@@ -2093,32 +2095,34 @@ export class PostgresStorageAdapter implements StorageAdapter {
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
if (value.$sum) {
|
||||
if (typeof value.$sum === 'string') {
|
||||
columns.push(`SUM($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$sum), field);
|
||||
index += 2;
|
||||
} else {
|
||||
countField = field;
|
||||
columns.push(`COUNT(*) AS $${index}:name`);
|
||||
values.push(field);
|
||||
index += 1;
|
||||
if (typeof value === 'object') {
|
||||
if (value.$sum) {
|
||||
if (typeof value.$sum === 'string') {
|
||||
columns.push(`SUM($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$sum), field);
|
||||
index += 2;
|
||||
} else {
|
||||
countField = field;
|
||||
columns.push(`COUNT(*) AS $${index}:name`);
|
||||
values.push(field);
|
||||
index += 1;
|
||||
}
|
||||
}
|
||||
if (value.$max) {
|
||||
columns.push(`MAX($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$max), field);
|
||||
index += 2;
|
||||
}
|
||||
if (value.$min) {
|
||||
columns.push(`MIN($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$min), field);
|
||||
index += 2;
|
||||
}
|
||||
if (value.$avg) {
|
||||
columns.push(`AVG($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$avg), field);
|
||||
index += 2;
|
||||
}
|
||||
}
|
||||
if (value.$max) {
|
||||
columns.push(`MAX($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$max), field);
|
||||
index += 2;
|
||||
}
|
||||
if (value.$min) {
|
||||
columns.push(`MIN($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$min), field);
|
||||
index += 2;
|
||||
}
|
||||
if (value.$avg) {
|
||||
columns.push(`AVG($${index}:name) AS $${index + 1}:name`);
|
||||
values.push(transformAggregateField(value.$avg), field);
|
||||
index += 2;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user