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:
dependabot[bot]
2019-01-19 13:08:42 -05:00
committed by Florent Vilmart
parent 30aa1ded1d
commit 3851641b5a
3 changed files with 39 additions and 35 deletions

6
package-lock.json generated
View File

@@ -4103,9 +4103,9 @@
} }
}, },
"flow-bin": { "flow-bin": {
"version": "0.83.0", "version": "0.91.0",
"resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.83.0.tgz", "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.91.0.tgz",
"integrity": "sha512-1K83EL/U9Gh0BaXPKkZe6TRizSmNSKx9Wuws1c8gh7DJEwiburtCxYT+4o7in1+GnNEm3CZWnbnVV8n9HMpiDA==", "integrity": "sha512-j+L+xNiUYnZZ27MjVI0y2c9474ZHOvdSQq0Tjwh56mEA7tfxYqp5Dcb6aZSwvs3tGMTjCrZow9aUlZf3OoRyDQ==",
"dev": true "dev": true
}, },
"follow-redirects": { "follow-redirects": {

View File

@@ -57,7 +57,7 @@
"deep-diff": "1.0.2", "deep-diff": "1.0.2",
"eslint": "^5.0.0", "eslint": "^5.0.0",
"eslint-plugin-flowtype": "^3.0.0", "eslint-plugin-flowtype": "^3.0.0",
"flow-bin": "0.83.0", "flow-bin": "0.91.0",
"gaze": "1.1.3", "gaze": "1.1.3",
"husky": "^1.0.0-rc.13", "husky": "^1.0.0-rc.13",
"jasmine": "3.1.0", "jasmine": "3.1.0",

View File

@@ -1963,12 +1963,14 @@ export class PostgresStorageAdapter implements StorageAdapter {
const wherePattern = const wherePattern =
where.pattern.length > 0 ? `WHERE ${where.pattern}` : ''; where.pattern.length > 0 ? `WHERE ${where.pattern}` : '';
const qs = `SELECT count(*) FROM $1:name ${wherePattern}`; const qs = `SELECT count(*) FROM $1:name ${wherePattern}`;
return this._client.one(qs, values, a => +a.count).catch(error => { return this._client
if (error.code !== PostgresRelationDoesNotExistError) { .one(qs, values, a => +a.count)
throw error; .catch(error => {
} if (error.code !== PostgresRelationDoesNotExistError) {
return 0; throw error;
}); }
return 0;
});
} }
distinct( distinct(
@@ -2093,32 +2095,34 @@ export class PostgresStorageAdapter implements StorageAdapter {
index += 1; index += 1;
continue; continue;
} }
if (value.$sum) { if (typeof value === 'object') {
if (typeof value.$sum === 'string') { if (value.$sum) {
columns.push(`SUM($${index}:name) AS $${index + 1}:name`); if (typeof value.$sum === 'string') {
values.push(transformAggregateField(value.$sum), field); columns.push(`SUM($${index}:name) AS $${index + 1}:name`);
index += 2; values.push(transformAggregateField(value.$sum), field);
} else { index += 2;
countField = field; } else {
columns.push(`COUNT(*) AS $${index}:name`); countField = field;
values.push(field); columns.push(`COUNT(*) AS $${index}:name`);
index += 1; 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 { } else {