@onivoro/server-aws-redshift 22.0.3 → 22.0.4

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.
@@ -28,4 +28,8 @@ export declare class RedshiftDataService {
28
28
  database: string;
29
29
  workgroupName: string;
30
30
  }): Promise<any>;
31
+ query(_: {
32
+ database: string;
33
+ workgroupName: string;
34
+ }, Sql: string): Promise<void>;
31
35
  }
@@ -150,6 +150,15 @@ let RedshiftDataService = class RedshiftDataService {
150
150
  throw error;
151
151
  }
152
152
  }
153
+ async query(_, Sql) {
154
+ const result = await this.redshiftDataClient.send(new client_redshift_data_1.ExecuteStatementCommand({
155
+ Database: _.database,
156
+ Sql,
157
+ WorkgroupName: _.workgroupName
158
+ }));
159
+ return await this.waitForStatement(result.Id);
160
+ // return await this.redshiftDataClient.send(new DescribeStatementCommand({ Id: result.Id }));
161
+ }
153
162
  };
154
163
  exports.RedshiftDataService = RedshiftDataService;
155
164
  exports.RedshiftDataService = RedshiftDataService = __decorate([
@@ -28,4 +28,8 @@ export declare class RedshiftDataService {
28
28
  database: string;
29
29
  workgroupName: string;
30
30
  }): Promise<any>;
31
+ query(_: {
32
+ database: string;
33
+ workgroupName: string;
34
+ }, Sql: string): Promise<void>;
31
35
  }
@@ -150,6 +150,15 @@ let RedshiftDataService = class RedshiftDataService {
150
150
  throw error;
151
151
  }
152
152
  }
153
+ async query(_, Sql) {
154
+ const result = await this.redshiftDataClient.send(new client_redshift_data_1.ExecuteStatementCommand({
155
+ Database: _.database,
156
+ Sql,
157
+ WorkgroupName: _.workgroupName
158
+ }));
159
+ return await this.waitForStatement(result.Id);
160
+ // return await this.redshiftDataClient.send(new DescribeStatementCommand({ Id: result.Id }));
161
+ }
153
162
  };
154
163
  exports.RedshiftDataService = RedshiftDataService;
155
164
  exports.RedshiftDataService = RedshiftDataService = __decorate([
@@ -28,4 +28,8 @@ export declare class RedshiftDataService {
28
28
  database: string;
29
29
  workgroupName: string;
30
30
  }): Promise<any>;
31
+ query(_: {
32
+ database: string;
33
+ workgroupName: string;
34
+ }, Sql: string): Promise<void>;
31
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onivoro/server-aws-redshift",
3
- "version": "22.0.3",
3
+ "version": "22.0.4",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/onivoro/server-aws-redshift.git"
6
6
  },