@malloydata/db-bigquery 0.0.334 → 0.0.336

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,6 +64,7 @@ export declare class BigQueryConnection extends BaseConnection implements Connec
64
64
  private readQueryOptions;
65
65
  canPersist(): this is PersistSQLResults;
66
66
  canStream(): this is StreamingConnection;
67
+ getDigest(): string;
67
68
  get supportsNesting(): boolean;
68
69
  private _runSQL;
69
70
  runSQL(sqlCommand: string, options?: RunSQLOptions, rowIndex?: number): Promise<MalloyQueryData>;
@@ -56,7 +56,6 @@ var __importStar = (this && this.__importStar) || (function () {
56
56
  })();
57
57
  Object.defineProperty(exports, "__esModule", { value: true });
58
58
  exports.BigQueryConnection = exports.BigQueryAuthenticationError = void 0;
59
- const crypto = __importStar(require("crypto"));
60
59
  const bigquery_1 = require("@google-cloud/bigquery");
61
60
  const googleCommon = __importStar(require("@google-cloud/common"));
62
61
  const gaxios_1 = require("gaxios");
@@ -154,6 +153,11 @@ class BigQueryConnection extends connection_1.BaseConnection {
154
153
  canStream() {
155
154
  return true;
156
155
  }
156
+ getDigest() {
157
+ var _a;
158
+ const data = `bigquery:${this.projectId}:${(_a = this.location) !== null && _a !== void 0 ? _a : 'US'}`;
159
+ return (0, malloy_1.makeDigest)(data);
160
+ }
157
161
  get supportsNesting() {
158
162
  return true;
159
163
  }
@@ -294,7 +298,7 @@ class BigQueryConnection extends connection_1.BaseConnection {
294
298
  *
295
299
  */
296
300
  async manifestTemporaryTable(sqlCommand) {
297
- const hash = crypto.createHash('md5').update(sqlCommand).digest('hex');
301
+ const hash = (0, malloy_1.makeDigest)(sqlCommand);
298
302
  const tempTableName = this.temporaryTables.get(hash);
299
303
  if (tempTableName !== undefined) {
300
304
  return tempTableName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/db-bigquery",
3
- "version": "0.0.334",
3
+ "version": "0.0.336",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "@google-cloud/bigquery": "^7.3.0",
26
26
  "@google-cloud/common": "^5.0.1",
27
27
  "@google-cloud/paginator": "^5.0.0",
28
- "@malloydata/malloy": "0.0.334",
28
+ "@malloydata/malloy": "0.0.336",
29
29
  "gaxios": "^4.2.0"
30
30
  }
31
31
  }