@malloydata/db-postgres 0.0.165-dev240813195925 → 0.0.165-dev240813215606
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Connection, ConnectionConfig, FetchSchemaOptions, MalloyQueryData, PersistSQLResults, PooledConnection, QueryDataRow, QueryOptionsReader, QueryRunStats, RunSQLOptions, SQLBlock, StreamingConnection, StructDef } from '@malloydata/malloy';
|
|
2
|
+
import { BaseConnection } from '@malloydata/malloy/connection';
|
|
2
3
|
import { Client, Pool } from 'pg';
|
|
3
4
|
interface PostgresConnectionConfiguration {
|
|
4
5
|
host?: string;
|
|
@@ -11,7 +12,7 @@ interface PostgresConnectionConfiguration {
|
|
|
11
12
|
type PostgresConnectionConfigurationReader = PostgresConnectionConfiguration | (() => Promise<PostgresConnectionConfiguration>);
|
|
12
13
|
export interface PostgresConnectionOptions extends ConnectionConfig, PostgresConnectionConfiguration {
|
|
13
14
|
}
|
|
14
|
-
export declare class PostgresConnection implements Connection, StreamingConnection, PersistSQLResults {
|
|
15
|
+
export declare class PostgresConnection extends BaseConnection implements Connection, StreamingConnection, PersistSQLResults {
|
|
15
16
|
readonly name: string;
|
|
16
17
|
private queryOptionsReader;
|
|
17
18
|
private configReader;
|
|
@@ -56,13 +56,15 @@ exports.PooledPostgresConnection = exports.PostgresConnection = void 0;
|
|
|
56
56
|
//
|
|
57
57
|
const crypto = __importStar(require("crypto"));
|
|
58
58
|
const malloy_1 = require("@malloydata/malloy");
|
|
59
|
+
const connection_1 = require("@malloydata/malloy/connection");
|
|
59
60
|
const pg_1 = require("pg");
|
|
60
61
|
const pg_query_stream_1 = __importDefault(require("pg-query-stream"));
|
|
61
62
|
const crypto_1 = require("crypto");
|
|
62
63
|
const DEFAULT_PAGE_SIZE = 1000;
|
|
63
64
|
const SCHEMA_PAGE_SIZE = 1000;
|
|
64
|
-
class PostgresConnection {
|
|
65
|
+
class PostgresConnection extends connection_1.BaseConnection {
|
|
65
66
|
constructor(arg, queryOptionsReader, configReader) {
|
|
67
|
+
super();
|
|
66
68
|
this.queryOptionsReader = {};
|
|
67
69
|
this.configReader = {};
|
|
68
70
|
this.dialect = new malloy_1.PostgresDialect();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-postgres",
|
|
3
|
-
"version": "0.0.165-
|
|
3
|
+
"version": "0.0.165-dev240813215606",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"prepublishOnly": "npm run build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@malloydata/malloy": "^0.0.165-
|
|
25
|
+
"@malloydata/malloy": "^0.0.165-dev240813215606",
|
|
26
26
|
"@types/pg": "^8.6.1",
|
|
27
27
|
"pg": "^8.7.1",
|
|
28
28
|
"pg-query-stream": "4.2.3"
|