diff --git a/.eslintrc b/.eslintrc index b1999b544..4565fd14c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,7 +2,7 @@ "plugins": ["@typescript-eslint", "prettier"], "parser": "@typescript-eslint/parser", "extends": ["eslint:recommended", "plugin:prettier/recommended", "prettier"], - "ignorePatterns": ["node_modules", "coverage", "packages/pg-protocol/dist/**/*", "packages/pg-query-stream/dist/**/*"], + "ignorePatterns": ["node_modules", "coverage", "packages/gaussdb-protocol/dist/**/*", "packages/gaussdb-query-stream/dist/**/*"], "parserOptions": { "ecmaVersion": 2017, "sourceType": "module" diff --git a/package.json b/package.json index 77a1fcc44..89f41d154 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "node-postgres", - "description": "node postgres monorepo", + "name": "gaussdb-node", + "description": "node gaussdb monorepo", "main": "index.js", "private": true, - "repository": "git@github.com:brianc/node-postgres.git", + "repository": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", "author": "Brian M. Carlson ", "license": "MIT", "workspaces": [ diff --git a/packages/pg-cloudflare/README.md b/packages/gaussdb-cloudflare/README.md similarity index 68% rename from packages/pg-cloudflare/README.md rename to packages/gaussdb-cloudflare/README.md index b2d6b9937..ebc585f09 100644 --- a/packages/pg-cloudflare/README.md +++ b/packages/gaussdb-cloudflare/README.md @@ -1,18 +1,18 @@ -# pg-cloudflare +# gaussdb-cloudflare -`pg-cloudflare` makes it easier to take an existing package that relies on `tls` and `net`, and make it work in environments where only `connect()` is supported, such as Cloudflare Workers. +`gaussdb-cloudflare` makes it easier to take an existing package that relies on `tls` and `net`, and make it work in environments where only `connect()` is supported, such as Cloudflare Workers. -`pg-cloudflare` wraps `connect()`, the [TCP Socket API](https://github.com/wintercg/proposal-sockets-api) proposed within WinterCG, and implemented in [Cloudflare Workers](https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/), and exposes an interface with methods similar to what the `net` and `tls` modules in Node.js expose. (ex: `net.connect(path[, options][, callback])`). This minimizes the number of changes needed in order to make an existing package work across JavaScript runtimes. +`gaussdb-cloudflare` wraps `connect()`, the [TCP Socket API](https://github.com/wintercg/proposal-sockets-api) proposed within WinterCG, and implemented in [Cloudflare Workers](https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/), and exposes an interface with methods similar to what the `net` and `tls` modules in Node.js expose. (ex: `net.connect(path[, options][, callback])`). This minimizes the number of changes needed in order to make an existing package work across JavaScript runtimes. ## Installation ``` -npm i --save-dev pg-cloudflare +npm i --save-dev gaussdb-cloudflare ``` ## How to use conditionally, in non-Node.js environments -As implemented in `pg` [here](https://github.com/brianc/node-postgres/commit/07553428e9c0eacf761a5d4541a3300ff7859578#diff-34588ad868ebcb232660aba7ee6a99d1e02f4bc93f73497d2688c3f074e60533R5-R13), a typical use case might look as follows, where in a Node.js environment the `net` module is used, while in a non-Node.js environment, where `net` is unavailable, `pg-cloudflare` is used instead, providing an equivalent interface: +As implemented in `pg` [here](https://github.com/brianc/node-postgres/commit/07553428e9c0eacf761a5d4541a3300ff7859578#diff-34588ad868ebcb232660aba7ee6a99d1e02f4bc93f73497d2688c3f074e60533R5-R13), a typical use case might look as follows, where in a Node.js environment the `net` module is used, while in a non-Node.js environment, where `net` is unavailable, `gaussdb-cloudflare` is used instead, providing an equivalent interface: ```js module.exports.getStream = function getStream(ssl = false) { @@ -20,7 +20,7 @@ module.exports.getStream = function getStream(ssl = false) { if (typeof net.Socket === 'function') { return net.Socket() } - const { CloudflareSocket } = require('pg-cloudflare') + const { CloudflareSocket } = require('gaussdb-cloudflare') return new CloudflareSocket(ssl); } ``` diff --git a/packages/pg-cloudflare/esm/index.mjs b/packages/gaussdb-cloudflare/esm/index.mjs similarity index 100% rename from packages/pg-cloudflare/esm/index.mjs rename to packages/gaussdb-cloudflare/esm/index.mjs diff --git a/packages/pg-cloudflare/package.json b/packages/gaussdb-cloudflare/package.json similarity index 68% rename from packages/pg-cloudflare/package.json rename to packages/gaussdb-cloudflare/package.json index d6e65746b..23051a10a 100644 --- a/packages/pg-cloudflare/package.json +++ b/packages/gaussdb-cloudflare/package.json @@ -1,7 +1,7 @@ { - "name": "pg-cloudflare", + "name": "gaussdb-cloudflare", "version": "1.2.5", - "description": "A socket implementation that can run on Cloudflare Workers using native TCP connections.", + "description": "A socket implementation for GaussDB that can run on Cloudflare Workers using native TCP connections.", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -24,8 +24,8 @@ }, "repository": { "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-cloudflare" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", + "directory": "packages/gaussdb-cloudflare" }, "files": [ "/dist/*{js,ts,map}", diff --git a/packages/pg-cloudflare/src/empty.ts b/packages/gaussdb-cloudflare/src/empty.ts similarity index 100% rename from packages/pg-cloudflare/src/empty.ts rename to packages/gaussdb-cloudflare/src/empty.ts diff --git a/packages/pg-cloudflare/src/index.ts b/packages/gaussdb-cloudflare/src/index.ts similarity index 100% rename from packages/pg-cloudflare/src/index.ts rename to packages/gaussdb-cloudflare/src/index.ts diff --git a/packages/pg-cloudflare/src/types.d.ts b/packages/gaussdb-cloudflare/src/types.d.ts similarity index 100% rename from packages/pg-cloudflare/src/types.d.ts rename to packages/gaussdb-cloudflare/src/types.d.ts diff --git a/packages/pg-cloudflare/tsconfig.json b/packages/gaussdb-cloudflare/tsconfig.json similarity index 100% rename from packages/pg-cloudflare/tsconfig.json rename to packages/gaussdb-cloudflare/tsconfig.json diff --git a/packages/pg-connection-string/.coveralls.yml b/packages/gaussdb-connection-string/.coveralls.yml similarity index 100% rename from packages/pg-connection-string/.coveralls.yml rename to packages/gaussdb-connection-string/.coveralls.yml diff --git a/packages/pg-connection-string/.gitignore b/packages/gaussdb-connection-string/.gitignore similarity index 100% rename from packages/pg-connection-string/.gitignore rename to packages/gaussdb-connection-string/.gitignore diff --git a/packages/pg-connection-string/.mocharc.json b/packages/gaussdb-connection-string/.mocharc.json similarity index 100% rename from packages/pg-connection-string/.mocharc.json rename to packages/gaussdb-connection-string/.mocharc.json diff --git a/packages/gaussdb-connection-string/.nyc_output/processinfo/index.json b/packages/gaussdb-connection-string/.nyc_output/processinfo/index.json new file mode 100644 index 000000000..c41bf7634 --- /dev/null +++ b/packages/gaussdb-connection-string/.nyc_output/processinfo/index.json @@ -0,0 +1 @@ +{"processes":{"4c70412b-c816-446c-afc4-b9c2db64880d":{"parent":null,"children":[]}},"files":{"/home/happy/gaussdb-node/packages/pg-connection-string/index.js":["4c70412b-c816-446c-afc4-b9c2db64880d"]},"externalIds":{}} \ No newline at end of file diff --git a/packages/pg-connection-string/LICENSE b/packages/gaussdb-connection-string/LICENSE similarity index 100% rename from packages/pg-connection-string/LICENSE rename to packages/gaussdb-connection-string/LICENSE diff --git a/packages/pg-connection-string/README.md b/packages/gaussdb-connection-string/README.md similarity index 100% rename from packages/pg-connection-string/README.md rename to packages/gaussdb-connection-string/README.md diff --git a/packages/pg-connection-string/esm/index.mjs b/packages/gaussdb-connection-string/esm/index.mjs similarity index 86% rename from packages/pg-connection-string/esm/index.mjs rename to packages/gaussdb-connection-string/esm/index.mjs index 7b390c514..b41b0680c 100644 --- a/packages/pg-connection-string/esm/index.mjs +++ b/packages/gaussdb-connection-string/esm/index.mjs @@ -1,4 +1,4 @@ -// ESM wrapper for pg-connection-string +// ESM wrapper for gaussdb-connection-string import connectionString from '../index.js' // Re-export the parse function diff --git a/packages/pg-connection-string/index.d.ts b/packages/gaussdb-connection-string/index.d.ts similarity index 95% rename from packages/pg-connection-string/index.d.ts rename to packages/gaussdb-connection-string/index.d.ts index 2ebe67534..2752fde9d 100644 --- a/packages/pg-connection-string/index.d.ts +++ b/packages/gaussdb-connection-string/index.d.ts @@ -1,4 +1,4 @@ -import { ClientConfig } from 'pg' +import { ClientConfig } from 'gaussdb' export function parse(connectionString: string, options?: Options): ConnectionOptions diff --git a/packages/pg-connection-string/index.js b/packages/gaussdb-connection-string/index.js similarity index 97% rename from packages/pg-connection-string/index.js rename to packages/gaussdb-connection-string/index.js index 7457c5dcc..b5fd44743 100644 --- a/packages/pg-connection-string/index.js +++ b/packages/gaussdb-connection-string/index.js @@ -145,7 +145,7 @@ function parse(str, options = {}) { return config } -// convert pg-connection-string ssl config to a ClientConfig.ConnectionOptions +// convert gaussdb-connection-string ssl config to a ClientConfig.ConnectionOptions function toConnectionOptions(sslConfig) { const connectionOptions = Object.entries(sslConfig).reduce((c, [key, value]) => { // we explicitly check for undefined and null instead of `if (value)` because some @@ -160,7 +160,7 @@ function toConnectionOptions(sslConfig) { return connectionOptions } -// convert pg-connection-string config to a ClientConfig +// convert gaussdb-connection-string config to a ClientConfig function toClientConfig(config) { const poolConfig = Object.entries(config).reduce((c, [key, value]) => { if (key === 'ssl') { diff --git a/packages/pg-connection-string/package.json b/packages/gaussdb-connection-string/package.json similarity index 67% rename from packages/pg-connection-string/package.json rename to packages/gaussdb-connection-string/package.json index 53b11e426..ec53461af 100644 --- a/packages/pg-connection-string/package.json +++ b/packages/gaussdb-connection-string/package.json @@ -1,7 +1,7 @@ { - "name": "pg-connection-string", + "name": "gaussdb-connection-string", "version": "2.9.0", - "description": "Functions for dealing with a PostgresSQL connection string", + "description": "Functions for dealing with a GaussDB connection string", "main": "./index.js", "types": "./index.d.ts", "exports": { @@ -18,21 +18,21 @@ }, "repository": { "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-connection-string" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", + "directory": "packages/gaussdb-connection-string" }, "keywords": [ - "pg", "connection", "string", - "parse" + "parse", + "gaussdb" ], "author": "Blaine Bublitz (http://iceddev.com/)", "license": "MIT", "bugs": { - "url": "https://github.com/brianc/node-postgres/issues" + "url": "https://github.com/HuaweiCloudDeveloper/gaussdb-node/issues" }, - "homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-connection-string", + "homepage": "https://github.com/HuaweiCloudDeveloper/gaussdb-node/tree/master/packages/gaussdb-connection-string", "devDependencies": { "@types/pg": "^8.12.0", "chai": "^4.1.1", diff --git a/packages/pg-connection-string/test/clientConfig.ts b/packages/gaussdb-connection-string/test/clientConfig.ts similarity index 100% rename from packages/pg-connection-string/test/clientConfig.ts rename to packages/gaussdb-connection-string/test/clientConfig.ts diff --git a/packages/pg-connection-string/test/example.ca b/packages/gaussdb-connection-string/test/example.ca similarity index 100% rename from packages/pg-connection-string/test/example.ca rename to packages/gaussdb-connection-string/test/example.ca diff --git a/packages/pg-connection-string/test/example.cert b/packages/gaussdb-connection-string/test/example.cert similarity index 100% rename from packages/pg-connection-string/test/example.cert rename to packages/gaussdb-connection-string/test/example.cert diff --git a/packages/pg-connection-string/test/example.key b/packages/gaussdb-connection-string/test/example.key similarity index 100% rename from packages/pg-connection-string/test/example.key rename to packages/gaussdb-connection-string/test/example.key diff --git a/packages/pg-connection-string/test/parse.ts b/packages/gaussdb-connection-string/test/parse.ts similarity index 100% rename from packages/pg-connection-string/test/parse.ts rename to packages/gaussdb-connection-string/test/parse.ts diff --git a/packages/pg-connection-string/tsconfig.json b/packages/gaussdb-connection-string/tsconfig.json similarity index 100% rename from packages/pg-connection-string/tsconfig.json rename to packages/gaussdb-connection-string/tsconfig.json diff --git a/packages/pg-cursor/README.md b/packages/gaussdb-cursor/README.md similarity index 100% rename from packages/pg-cursor/README.md rename to packages/gaussdb-cursor/README.md diff --git a/packages/pg-cursor/esm/index.mjs b/packages/gaussdb-cursor/esm/index.mjs similarity index 75% rename from packages/pg-cursor/esm/index.mjs rename to packages/gaussdb-cursor/esm/index.mjs index 65b0db041..dfad61fd2 100644 --- a/packages/pg-cursor/esm/index.mjs +++ b/packages/gaussdb-cursor/esm/index.mjs @@ -1,4 +1,4 @@ -// ESM wrapper for pg-cursor +// ESM wrapper for gaussdb-cursor import Cursor from '../index.js' // Export as default only to match CJS module diff --git a/packages/pg-cursor/index.js b/packages/gaussdb-cursor/index.js similarity index 98% rename from packages/pg-cursor/index.js rename to packages/gaussdb-cursor/index.js index f1553cc9c..4f41e81b7 100644 --- a/packages/pg-cursor/index.js +++ b/packages/gaussdb-cursor/index.js @@ -1,7 +1,7 @@ 'use strict' // note: can remove these deep requires when we bump min version of pg to 9.x -const Result = require('pg/lib/result.js') -const prepare = require('pg/lib/utils.js').prepareValue +const Result = require('gaussdb/lib/result.js') +const prepare = require('gaussdb/lib/utils.js').prepareValue const EventEmitter = require('events').EventEmitter const util = require('util') diff --git a/packages/pg-cursor/package.json b/packages/gaussdb-cursor/package.json similarity index 66% rename from packages/pg-cursor/package.json rename to packages/gaussdb-cursor/package.json index 356254e92..70ce4754a 100644 --- a/packages/pg-cursor/package.json +++ b/packages/gaussdb-cursor/package.json @@ -1,7 +1,7 @@ { - "name": "pg-cursor", + "name": "gaussdb-cursor", "version": "2.15.0", - "description": "Query cursor extension for node-postgres", + "description": "Query cursor extension for GaussDB", "main": "index.js", "exports": { ".": { @@ -18,17 +18,17 @@ }, "repository": { "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-cursor" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", + "directory": "packages/gaussdb-cursor" }, "author": "Brian M. Carlson", "license": "MIT", "devDependencies": { "mocha": "^10.5.2", - "pg": "^8.16.0" + "gaussdb": "^8.16.0" }, "peerDependencies": { - "pg": "^8" + "gaussdb": "^8" }, "files": [ "index.js", diff --git a/packages/pg-cursor/test/close.js b/packages/gaussdb-cursor/test/close.js similarity index 98% rename from packages/pg-cursor/test/close.js rename to packages/gaussdb-cursor/test/close.js index b34161a17..8da5d21cb 100644 --- a/packages/pg-cursor/test/close.js +++ b/packages/gaussdb-cursor/test/close.js @@ -1,6 +1,6 @@ const assert = require('assert') const Cursor = require('../') -const pg = require('pg') +const pg = require('gaussdb') const text = 'SELECT generate_series as num FROM generate_series(0, 50)' describe('close', function () { diff --git a/packages/pg-cursor/test/error-handling.js b/packages/gaussdb-cursor/test/error-handling.js similarity index 99% rename from packages/pg-cursor/test/error-handling.js rename to packages/gaussdb-cursor/test/error-handling.js index 9234870d5..2bfde2e78 100644 --- a/packages/pg-cursor/test/error-handling.js +++ b/packages/gaussdb-cursor/test/error-handling.js @@ -1,7 +1,7 @@ 'use strict' const assert = require('assert') const Cursor = require('../') -const pg = require('pg') +const pg = require('gaussdb') const text = 'SELECT generate_series as num FROM generate_series(0, 4)' diff --git a/packages/pg-cursor/test/index.js b/packages/gaussdb-cursor/test/index.js similarity index 99% rename from packages/pg-cursor/test/index.js rename to packages/gaussdb-cursor/test/index.js index 24d3cfd79..120a935a6 100644 --- a/packages/pg-cursor/test/index.js +++ b/packages/gaussdb-cursor/test/index.js @@ -1,6 +1,6 @@ const assert = require('assert') const Cursor = require('../') -const pg = require('pg') +const pg = require('gaussdb') const text = 'SELECT generate_series as num FROM generate_series(0, 5)' diff --git a/packages/pg-cursor/test/mocha.opts b/packages/gaussdb-cursor/test/mocha.opts similarity index 100% rename from packages/pg-cursor/test/mocha.opts rename to packages/gaussdb-cursor/test/mocha.opts diff --git a/packages/pg-cursor/test/no-data-handling.js b/packages/gaussdb-cursor/test/no-data-handling.js similarity index 96% rename from packages/pg-cursor/test/no-data-handling.js rename to packages/gaussdb-cursor/test/no-data-handling.js index 9c860b9cd..abc62b31f 100644 --- a/packages/pg-cursor/test/no-data-handling.js +++ b/packages/gaussdb-cursor/test/no-data-handling.js @@ -1,5 +1,5 @@ const assert = require('assert') -const pg = require('pg') +const pg = require('gaussdb') const Cursor = require('../') describe('queries with no data', function () { diff --git a/packages/pg-cursor/test/pool.js b/packages/gaussdb-cursor/test/pool.js similarity index 98% rename from packages/pg-cursor/test/pool.js rename to packages/gaussdb-cursor/test/pool.js index 9d8ca772f..fd70ea955 100644 --- a/packages/pg-cursor/test/pool.js +++ b/packages/gaussdb-cursor/test/pool.js @@ -1,7 +1,7 @@ 'use strict' const assert = require('assert') const Cursor = require('../') -const pg = require('pg') +const pg = require('gaussdb') const text = 'SELECT generate_series as num FROM generate_series(0, 50)' diff --git a/packages/pg-cursor/test/promises.js b/packages/gaussdb-cursor/test/promises.js similarity index 97% rename from packages/pg-cursor/test/promises.js rename to packages/gaussdb-cursor/test/promises.js index 1635a1a8b..c26d2d2da 100644 --- a/packages/pg-cursor/test/promises.js +++ b/packages/gaussdb-cursor/test/promises.js @@ -1,6 +1,6 @@ const assert = require('assert') const Cursor = require('../') -const pg = require('pg') +const pg = require('gaussdb') const text = 'SELECT generate_series as num FROM generate_series(0, 5)' diff --git a/packages/pg-cursor/test/query-config.js b/packages/gaussdb-cursor/test/query-config.js similarity index 97% rename from packages/pg-cursor/test/query-config.js rename to packages/gaussdb-cursor/test/query-config.js index 855af305c..e9bcc5c71 100644 --- a/packages/pg-cursor/test/query-config.js +++ b/packages/gaussdb-cursor/test/query-config.js @@ -1,7 +1,7 @@ 'use strict' const assert = require('assert') const Cursor = require('../') -const pg = require('pg') +const pg = require('gaussdb') describe('query config passed to result', () => { it('passes rowMode to result', (done) => { diff --git a/packages/pg-cursor/test/transactions.js b/packages/gaussdb-cursor/test/transactions.js similarity index 98% rename from packages/pg-cursor/test/transactions.js rename to packages/gaussdb-cursor/test/transactions.js index 298b88e1a..e08911609 100644 --- a/packages/pg-cursor/test/transactions.js +++ b/packages/gaussdb-cursor/test/transactions.js @@ -1,6 +1,6 @@ const assert = require('assert') const Cursor = require('../') -const pg = require('pg') +const pg = require('gaussdb') // SKIP: 不支持 LISTEN/NOFITY statement // https://github.com/HuaweiCloudDeveloper/gaussdb-drivers/blob/master-dev/diff-gaussdb-postgres.md#%E4%B8%8D%E6%94%AF%E6%8C%81-listennofity-statement diff --git a/packages/pg-esm-test/README.md b/packages/gaussdb-esm-test/README.md similarity index 100% rename from packages/pg-esm-test/README.md rename to packages/gaussdb-esm-test/README.md diff --git a/packages/pg-esm-test/common-js-imports.test.cjs b/packages/gaussdb-esm-test/common-js-imports.test.cjs similarity index 78% rename from packages/pg-esm-test/common-js-imports.test.cjs rename to packages/gaussdb-esm-test/common-js-imports.test.cjs index 21c03e049..34e70d57d 100644 --- a/packages/pg-esm-test/common-js-imports.test.cjs +++ b/packages/gaussdb-esm-test/common-js-imports.test.cjs @@ -3,10 +3,10 @@ const test = require('node:test') const { describe, it } = test const paths = [ - 'pg', - 'pg/lib/index.js', - 'pg/lib/connection-parameters.js', - 'pg-protocol/dist/messages.js', + 'gaussdb', + 'gaussdb/lib/index.js', + 'gaussdb/lib/connection-parameters.js', + 'gaussdb-protocol/dist/messages.js', 'pg-native/lib/build-result.js', ] for (const path of paths) { @@ -20,7 +20,7 @@ for (const path of paths) { describe('pg-native', () => { it('should work with commonjs', async () => { - const pg = require('pg') + const pg = require('gaussdb') const pool = new pg.native.Pool() const result = await pool.query('SELECT 1') diff --git a/packages/pg-esm-test/pg-cloudflare.test.js b/packages/gaussdb-esm-test/gaussdb-cloudflare.test.js similarity index 65% rename from packages/pg-esm-test/pg-cloudflare.test.js rename to packages/gaussdb-esm-test/gaussdb-cloudflare.test.js index d07f45560..ea33193d8 100644 --- a/packages/pg-esm-test/pg-cloudflare.test.js +++ b/packages/gaussdb-esm-test/gaussdb-cloudflare.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert' import { describe, it } from 'node:test' -import { CloudflareSocket } from 'pg-cloudflare' +import { CloudflareSocket } from 'gaussdb-cloudflare' -describe('pg-cloudflare', () => { +describe('gaussdb-cloudflare', () => { it('should export CloudflareSocket constructor', () => { assert.ok(new CloudflareSocket()) }) diff --git a/packages/pg-esm-test/pg-connection-string.test.js b/packages/gaussdb-esm-test/gaussdb-connection-string.test.js similarity index 75% rename from packages/pg-esm-test/pg-connection-string.test.js rename to packages/gaussdb-esm-test/gaussdb-connection-string.test.js index 9914fe5de..7d9422d46 100644 --- a/packages/pg-esm-test/pg-connection-string.test.js +++ b/packages/gaussdb-esm-test/gaussdb-connection-string.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert' import { describe, it } from 'node:test' -import { parse, toClientConfig, parseIntoClientConfig } from 'pg-connection-string' +import { parse, toClientConfig, parseIntoClientConfig } from 'gaussdb-connection-string' -describe('pg-connection-string', () => { +describe('gaussdb-connection-string', () => { it('should export parse function', () => { assert.strictEqual(typeof parse, 'function') }) diff --git a/packages/pg-esm-test/pg-cursor.test.js b/packages/gaussdb-esm-test/gaussdb-cursor.test.js similarity index 70% rename from packages/pg-esm-test/pg-cursor.test.js rename to packages/gaussdb-esm-test/gaussdb-cursor.test.js index aaba955bd..fd2f7ec94 100644 --- a/packages/pg-esm-test/pg-cursor.test.js +++ b/packages/gaussdb-esm-test/gaussdb-cursor.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert' import { describe, it } from 'node:test' -import Cursor from 'pg-cursor' +import Cursor from 'gaussdb-cursor' -describe('pg-cursor', () => { +describe('gaussdb-cursor', () => { it('should export Cursor constructor as default', () => { assert.ok(new Cursor()) }) diff --git a/packages/pg-esm-test/pg-pool.test.js b/packages/gaussdb-esm-test/gaussdb-pool.test.js similarity index 70% rename from packages/pg-esm-test/pg-pool.test.js rename to packages/gaussdb-esm-test/gaussdb-pool.test.js index ee0d23f1a..6f779dd5a 100644 --- a/packages/pg-esm-test/pg-pool.test.js +++ b/packages/gaussdb-esm-test/gaussdb-pool.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert' import { describe, it } from 'node:test' -import Pool from 'pg-pool' +import Pool from 'gaussdb-pool' -describe('pg-pool', () => { +describe('gaussdb-pool', () => { it('should export Pool constructor', () => { assert.ok(new Pool()) }) diff --git a/packages/pg-esm-test/pg-protocol.test.js b/packages/gaussdb-esm-test/gaussdb-protocol.test.js similarity index 77% rename from packages/pg-esm-test/pg-protocol.test.js rename to packages/gaussdb-esm-test/gaussdb-protocol.test.js index 68fc47229..1b3659b0d 100644 --- a/packages/pg-esm-test/pg-protocol.test.js +++ b/packages/gaussdb-esm-test/gaussdb-protocol.test.js @@ -1,8 +1,8 @@ -import protocol, { NoticeMessage, DatabaseError } from 'pg-protocol/dist/messages.js' +import protocol, { NoticeMessage, DatabaseError } from 'gaussdb-protocol/dist/messages.js' import { describe, it } from 'node:test' import { strict as assert } from 'node:assert' -describe('pg-protocol', () => { +describe('gaussdb-protocol', () => { it('should export database error', () => { assert.ok(DatabaseError) }) diff --git a/packages/pg-esm-test/pg-query-stream.test.js b/packages/gaussdb-esm-test/gaussdb-query-stream.test.js similarity index 67% rename from packages/pg-esm-test/pg-query-stream.test.js rename to packages/gaussdb-esm-test/gaussdb-query-stream.test.js index 507bfff24..512787a19 100644 --- a/packages/pg-esm-test/pg-query-stream.test.js +++ b/packages/gaussdb-esm-test/gaussdb-query-stream.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert' import { describe, it } from 'node:test' -import QueryStream from 'pg-query-stream' +import QueryStream from 'gaussdb-query-stream' -describe('pg-query-stream', () => { +describe('gaussdb-query-stream', () => { it('should export QueryStream constructor as default', () => { assert.ok(new QueryStream()) }) diff --git a/packages/pg-esm-test/pg.test.js b/packages/gaussdb-esm-test/gaussdb.test.js similarity index 98% rename from packages/pg-esm-test/pg.test.js rename to packages/gaussdb-esm-test/gaussdb.test.js index 8acc7bffd..ac5085402 100644 --- a/packages/pg-esm-test/pg.test.js +++ b/packages/gaussdb-esm-test/gaussdb.test.js @@ -11,7 +11,7 @@ import pg, { escapeLiteral, Result, TypeOverrides, -} from 'pg' +} from 'gaussdb' describe('pg', () => { it('should export Client constructor', () => { diff --git a/packages/gaussdb-esm-test/package.json b/packages/gaussdb-esm-test/package.json new file mode 100644 index 000000000..d82154e51 --- /dev/null +++ b/packages/gaussdb-esm-test/package.json @@ -0,0 +1,26 @@ +{ + "name": "gaussdb-esm-test", + "version": "1.2.0", + "description": "A test module for GaussDB with ESM support", + "main": "index.js", + "type": "module", + "scripts": { + "test": "node --test" + }, + "keywords": [ + "gaussdb", + "esm", + "test" + ], + "devDependencies": { + "gaussdb": "^8.16.0", + "gaussdb-cloudflare": "^1.2.5", + "gaussdb-cursor": "^2.15.0", + "pg-native": "^3.5.0", + "gaussdb-pool": "^3.10.0", + "gaussdb-protocol": "^1.10.0", + "gaussdb-query-stream": "^4.10.0" + }, + "author": "Brian M. Carlson ", + "license": "MIT" +} diff --git a/packages/pg-esm-test/pg-native.test.js b/packages/gaussdb-esm-test/pg-native.test.js similarity index 100% rename from packages/pg-esm-test/pg-native.test.js rename to packages/gaussdb-esm-test/pg-native.test.js diff --git a/packages/pg-pool/LICENSE b/packages/gaussdb-pool/LICENSE similarity index 100% rename from packages/pg-pool/LICENSE rename to packages/gaussdb-pool/LICENSE diff --git a/packages/pg-pool/README.md b/packages/gaussdb-pool/README.md similarity index 100% rename from packages/pg-pool/README.md rename to packages/gaussdb-pool/README.md diff --git a/packages/pg-pool/esm/index.mjs b/packages/gaussdb-pool/esm/index.mjs similarity index 75% rename from packages/pg-pool/esm/index.mjs rename to packages/gaussdb-pool/esm/index.mjs index a97fb624d..bf43474ef 100644 --- a/packages/pg-pool/esm/index.mjs +++ b/packages/gaussdb-pool/esm/index.mjs @@ -1,4 +1,4 @@ -// ESM wrapper for pg-pool +// ESM wrapper for gaussdb-pool import Pool from '../index.js' // Export as default only to match CJS module diff --git a/packages/pg-pool/index.js b/packages/gaussdb-pool/index.js similarity index 99% rename from packages/pg-pool/index.js rename to packages/gaussdb-pool/index.js index 23a7940fe..01f88c580 100644 --- a/packages/pg-pool/index.js +++ b/packages/gaussdb-pool/index.js @@ -92,7 +92,7 @@ class Pool extends EventEmitter { this.options.allowExitOnIdle = this.options.allowExitOnIdle || false this.options.maxLifetimeSeconds = this.options.maxLifetimeSeconds || 0 this.log = this.options.log || function () {} - this.Client = this.options.Client || Client || require('pg').Client + this.Client = this.options.Client || Client || require('gaussdb').Client this.Promise = this.options.Promise || global.Promise if (typeof this.options.idleTimeoutMillis === 'undefined') { diff --git a/packages/pg-pool/package.json b/packages/gaussdb-pool/package.json similarity index 64% rename from packages/pg-pool/package.json rename to packages/gaussdb-pool/package.json index 38ad9e998..7979b7a29 100644 --- a/packages/pg-pool/package.json +++ b/packages/gaussdb-pool/package.json @@ -1,7 +1,7 @@ { - "name": "pg-pool", + "name": "gaussdb-pool", "version": "3.10.0", - "description": "Connection pool for node-postgres", + "description": "Connection pool for GaussDB", "main": "index.js", "exports": { ".": { @@ -18,21 +18,16 @@ }, "repository": { "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-pool" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", + "directory": "packages/gaussdb-pool" }, "keywords": [ - "pg", - "postgres", + "gaussdb", "pool", "database" ], "author": "Brian M. Carlson", "license": "MIT", - "bugs": { - "url": "https://github.com/brianc/node-pg-pool/issues" - }, - "homepage": "https://github.com/brianc/node-pg-pool#readme", "devDependencies": { "bluebird": "3.7.2", "co": "4.6.0", @@ -41,7 +36,7 @@ "mocha": "^10.5.2" }, "peerDependencies": { - "pg": ">=8.0" + "gaussdb": ">=8.0" }, "files": [ "index.js", diff --git a/packages/pg-pool/test/bring-your-own-promise.js b/packages/gaussdb-pool/test/bring-your-own-promise.js similarity index 100% rename from packages/pg-pool/test/bring-your-own-promise.js rename to packages/gaussdb-pool/test/bring-your-own-promise.js diff --git a/packages/pg-pool/test/connection-strings.js b/packages/gaussdb-pool/test/connection-strings.js similarity index 100% rename from packages/pg-pool/test/connection-strings.js rename to packages/gaussdb-pool/test/connection-strings.js diff --git a/packages/pg-pool/test/connection-timeout.js b/packages/gaussdb-pool/test/connection-timeout.js similarity index 98% rename from packages/pg-pool/test/connection-timeout.js rename to packages/gaussdb-pool/test/connection-timeout.js index cb83f7006..56fa4c5cb 100644 --- a/packages/pg-pool/test/connection-timeout.js +++ b/packages/gaussdb-pool/test/connection-timeout.js @@ -138,7 +138,7 @@ describe('connection timeout', () => { }) it('continues processing after a connection failure', (done) => { - const Client = require('pg').Client + const Client = require('gaussdb').Client const orgConnect = Client.prototype.connect let called = false @@ -173,7 +173,7 @@ describe('connection timeout', () => { }) it('releases newly connected clients if the queued already timed out', (done) => { - const Client = require('pg').Client + const Client = require('gaussdb').Client const orgConnect = Client.prototype.connect diff --git a/packages/pg-pool/test/ending.js b/packages/gaussdb-pool/test/ending.js similarity index 100% rename from packages/pg-pool/test/ending.js rename to packages/gaussdb-pool/test/ending.js diff --git a/packages/pg-pool/test/error-handling.js b/packages/gaussdb-pool/test/error-handling.js similarity index 100% rename from packages/pg-pool/test/error-handling.js rename to packages/gaussdb-pool/test/error-handling.js diff --git a/packages/pg-pool/test/events.js b/packages/gaussdb-pool/test/events.js similarity index 100% rename from packages/pg-pool/test/events.js rename to packages/gaussdb-pool/test/events.js diff --git a/packages/pg-pool/test/idle-timeout-exit.js b/packages/gaussdb-pool/test/idle-timeout-exit.js similarity index 100% rename from packages/pg-pool/test/idle-timeout-exit.js rename to packages/gaussdb-pool/test/idle-timeout-exit.js diff --git a/packages/pg-pool/test/idle-timeout.js b/packages/gaussdb-pool/test/idle-timeout.js similarity index 100% rename from packages/pg-pool/test/idle-timeout.js rename to packages/gaussdb-pool/test/idle-timeout.js diff --git a/packages/pg-pool/test/index.js b/packages/gaussdb-pool/test/index.js similarity index 100% rename from packages/pg-pool/test/index.js rename to packages/gaussdb-pool/test/index.js diff --git a/packages/pg-pool/test/lifetime-timeout.js b/packages/gaussdb-pool/test/lifetime-timeout.js similarity index 100% rename from packages/pg-pool/test/lifetime-timeout.js rename to packages/gaussdb-pool/test/lifetime-timeout.js diff --git a/packages/pg-pool/test/logging.js b/packages/gaussdb-pool/test/logging.js similarity index 100% rename from packages/pg-pool/test/logging.js rename to packages/gaussdb-pool/test/logging.js diff --git a/packages/pg-pool/test/max-uses.js b/packages/gaussdb-pool/test/max-uses.js similarity index 100% rename from packages/pg-pool/test/max-uses.js rename to packages/gaussdb-pool/test/max-uses.js diff --git a/packages/pg-pool/test/releasing-clients.js b/packages/gaussdb-pool/test/releasing-clients.js similarity index 100% rename from packages/pg-pool/test/releasing-clients.js rename to packages/gaussdb-pool/test/releasing-clients.js diff --git a/packages/pg-pool/test/setup.js b/packages/gaussdb-pool/test/setup.js similarity index 100% rename from packages/pg-pool/test/setup.js rename to packages/gaussdb-pool/test/setup.js diff --git a/packages/pg-pool/test/sizing.js b/packages/gaussdb-pool/test/sizing.js similarity index 100% rename from packages/pg-pool/test/sizing.js rename to packages/gaussdb-pool/test/sizing.js diff --git a/packages/pg-pool/test/submittable.js b/packages/gaussdb-pool/test/submittable.js similarity index 92% rename from packages/pg-pool/test/submittable.js rename to packages/gaussdb-pool/test/submittable.js index 7a1574d46..18166f464 100644 --- a/packages/pg-pool/test/submittable.js +++ b/packages/gaussdb-pool/test/submittable.js @@ -1,5 +1,5 @@ 'use strict' -const Cursor = require('pg-cursor') +const Cursor = require('gaussdb-cursor') const expect = require('expect.js') const describe = require('mocha').describe const it = require('mocha').it diff --git a/packages/pg-pool/test/timeout.js b/packages/gaussdb-pool/test/timeout.js similarity index 100% rename from packages/pg-pool/test/timeout.js rename to packages/gaussdb-pool/test/timeout.js diff --git a/packages/pg-pool/test/verify.js b/packages/gaussdb-pool/test/verify.js similarity index 100% rename from packages/pg-pool/test/verify.js rename to packages/gaussdb-pool/test/verify.js diff --git a/packages/gaussdb-protocol/README.md b/packages/gaussdb-protocol/README.md new file mode 100644 index 000000000..eae93c1fb --- /dev/null +++ b/packages/gaussdb-protocol/README.md @@ -0,0 +1,3 @@ +# gaussdb-protocol + +Low level Gaussdb wire protocol parser and serializer written in Typescript. Used by node-Gaussdb. Needs more documentation. :smile: diff --git a/packages/pg-protocol/esm/index.js b/packages/gaussdb-protocol/esm/index.js similarity index 89% rename from packages/pg-protocol/esm/index.js rename to packages/gaussdb-protocol/esm/index.js index c52807d63..41a3c83e2 100644 --- a/packages/pg-protocol/esm/index.js +++ b/packages/gaussdb-protocol/esm/index.js @@ -1,4 +1,4 @@ -// ESM wrapper for pg-protocol +// ESM wrapper for gaussdb-protocol import * as protocol from '../dist/index.js' // Re-export all the properties diff --git a/packages/pg-protocol/package.json b/packages/gaussdb-protocol/package.json similarity index 79% rename from packages/pg-protocol/package.json rename to packages/gaussdb-protocol/package.json index 3a462a50c..b95222a94 100644 --- a/packages/pg-protocol/package.json +++ b/packages/gaussdb-protocol/package.json @@ -1,7 +1,7 @@ { - "name": "pg-protocol", + "name": "gaussdb-protocol", "version": "1.10.0", - "description": "The postgres client/server binary protocol, implemented in TypeScript", + "description": "The GaussDB client/server binary protocol, implemented in TypeScript", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { @@ -36,8 +36,8 @@ }, "repository": { "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-protocol" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", + "directory": "packages/gaussdb-protocol" }, "files": [ "/dist/*{js,ts,map}", diff --git a/packages/pg-protocol/src/b.ts b/packages/gaussdb-protocol/src/b.ts similarity index 100% rename from packages/pg-protocol/src/b.ts rename to packages/gaussdb-protocol/src/b.ts diff --git a/packages/pg-protocol/src/buffer-reader.ts b/packages/gaussdb-protocol/src/buffer-reader.ts similarity index 100% rename from packages/pg-protocol/src/buffer-reader.ts rename to packages/gaussdb-protocol/src/buffer-reader.ts diff --git a/packages/pg-protocol/src/buffer-writer.ts b/packages/gaussdb-protocol/src/buffer-writer.ts similarity index 100% rename from packages/pg-protocol/src/buffer-writer.ts rename to packages/gaussdb-protocol/src/buffer-writer.ts diff --git a/packages/pg-protocol/src/inbound-parser.test.ts b/packages/gaussdb-protocol/src/inbound-parser.test.ts similarity index 100% rename from packages/pg-protocol/src/inbound-parser.test.ts rename to packages/gaussdb-protocol/src/inbound-parser.test.ts diff --git a/packages/pg-protocol/src/index.ts b/packages/gaussdb-protocol/src/index.ts similarity index 100% rename from packages/pg-protocol/src/index.ts rename to packages/gaussdb-protocol/src/index.ts diff --git a/packages/pg-protocol/src/messages.ts b/packages/gaussdb-protocol/src/messages.ts similarity index 100% rename from packages/pg-protocol/src/messages.ts rename to packages/gaussdb-protocol/src/messages.ts diff --git a/packages/pg-protocol/src/outbound-serializer.test.ts b/packages/gaussdb-protocol/src/outbound-serializer.test.ts similarity index 100% rename from packages/pg-protocol/src/outbound-serializer.test.ts rename to packages/gaussdb-protocol/src/outbound-serializer.test.ts diff --git a/packages/pg-protocol/src/parser.ts b/packages/gaussdb-protocol/src/parser.ts similarity index 100% rename from packages/pg-protocol/src/parser.ts rename to packages/gaussdb-protocol/src/parser.ts diff --git a/packages/pg-protocol/src/serializer.ts b/packages/gaussdb-protocol/src/serializer.ts similarity index 100% rename from packages/pg-protocol/src/serializer.ts rename to packages/gaussdb-protocol/src/serializer.ts diff --git a/packages/pg-protocol/src/testing/buffer-list.ts b/packages/gaussdb-protocol/src/testing/buffer-list.ts similarity index 100% rename from packages/pg-protocol/src/testing/buffer-list.ts rename to packages/gaussdb-protocol/src/testing/buffer-list.ts diff --git a/packages/pg-protocol/src/testing/test-buffers.ts b/packages/gaussdb-protocol/src/testing/test-buffers.ts similarity index 100% rename from packages/pg-protocol/src/testing/test-buffers.ts rename to packages/gaussdb-protocol/src/testing/test-buffers.ts diff --git a/packages/pg-protocol/src/types/chunky.d.ts b/packages/gaussdb-protocol/src/types/chunky.d.ts similarity index 100% rename from packages/pg-protocol/src/types/chunky.d.ts rename to packages/gaussdb-protocol/src/types/chunky.d.ts diff --git a/packages/pg-protocol/tsconfig.json b/packages/gaussdb-protocol/tsconfig.json similarity index 100% rename from packages/pg-protocol/tsconfig.json rename to packages/gaussdb-protocol/tsconfig.json diff --git a/packages/pg-query-stream/LICENSE b/packages/gaussdb-query-stream/LICENSE similarity index 100% rename from packages/pg-query-stream/LICENSE rename to packages/gaussdb-query-stream/LICENSE diff --git a/packages/pg-query-stream/README.md b/packages/gaussdb-query-stream/README.md similarity index 100% rename from packages/pg-query-stream/README.md rename to packages/gaussdb-query-stream/README.md diff --git a/packages/pg-query-stream/esm/index.mjs b/packages/gaussdb-query-stream/esm/index.mjs similarity index 74% rename from packages/pg-query-stream/esm/index.mjs rename to packages/gaussdb-query-stream/esm/index.mjs index 34429f2e4..e9e49442e 100644 --- a/packages/pg-query-stream/esm/index.mjs +++ b/packages/gaussdb-query-stream/esm/index.mjs @@ -1,4 +1,4 @@ -// ESM wrapper for pg-query-stream +// ESM wrapper for gaussdb-query-stream import QueryStream from '../dist/index.js' // Export as default only to match CJS module diff --git a/packages/pg-query-stream/package.json b/packages/gaussdb-query-stream/package.json similarity index 71% rename from packages/pg-query-stream/package.json rename to packages/gaussdb-query-stream/package.json index 6990a8469..f32539e65 100644 --- a/packages/pg-query-stream/package.json +++ b/packages/gaussdb-query-stream/package.json @@ -1,7 +1,7 @@ { - "name": "pg-query-stream", + "name": "gaussdb-query-stream", "version": "4.10.0", - "description": "Postgres query result returned as readable stream", + "description": "GaussDB query result returned as readable stream", "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { @@ -16,14 +16,13 @@ }, "repository": { "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-query-stream" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", + "directory": "packages/gaussdb-query-stream" }, "keywords": [ - "postgres", "query-stream", - "pg", "query", + "gaussdb", "stream" ], "files": [ @@ -34,7 +33,7 @@ "author": "Brian M. Carlson", "license": "MIT", "bugs": { - "url": "https://github.com/brianc/node-postgres/issues" + "url": "https://github.com/HuaweiCloudDeveloper/gaussdb-node/issues" }, "devDependencies": { "@types/chai": "^4.2.13", @@ -45,15 +44,15 @@ "concat-stream": "~1.0.1", "eslint-plugin-promise": "^6.0.1", "mocha": "^10.5.2", - "pg": "^8.16.0", + "gaussdb": "^8.16.0", "stream-spec": "~0.3.5", "ts-node": "^8.5.4", "typescript": "^4.0.3" }, "peerDependencies": { - "pg": "^8" + "gaussdb": "^8" }, "dependencies": { - "pg-cursor": "^2.15.0" + "gaussdb-cursor": "^2.15.0" } } diff --git a/packages/pg-query-stream/src/index.ts b/packages/gaussdb-query-stream/src/index.ts similarity index 95% rename from packages/pg-query-stream/src/index.ts rename to packages/gaussdb-query-stream/src/index.ts index c942b0441..abb7f6234 100644 --- a/packages/pg-query-stream/src/index.ts +++ b/packages/gaussdb-query-stream/src/index.ts @@ -1,6 +1,6 @@ import { Readable } from 'stream' -import { Submittable, Connection } from 'pg' -import Cursor from 'pg-cursor' +import { Submittable, Connection } from 'gaussdb' +import Cursor from 'gaussdb-cursor' interface QueryStreamConfig { batchSize?: number diff --git a/packages/pg-query-stream/test/async-iterator.ts b/packages/gaussdb-query-stream/test/async-iterator.ts similarity index 99% rename from packages/pg-query-stream/test/async-iterator.ts rename to packages/gaussdb-query-stream/test/async-iterator.ts index e2f8a7552..db51296e6 100644 --- a/packages/pg-query-stream/test/async-iterator.ts +++ b/packages/gaussdb-query-stream/test/async-iterator.ts @@ -1,5 +1,5 @@ import QueryStream from '../src' -import pg from 'pg' +import pg from 'gaussdb' import assert from 'assert' const queryText = 'SELECT * FROM generate_series(0, 200) num' diff --git a/packages/pg-query-stream/test/client-options.ts b/packages/gaussdb-query-stream/test/client-options.ts similarity index 94% rename from packages/pg-query-stream/test/client-options.ts rename to packages/gaussdb-query-stream/test/client-options.ts index 6646347fb..93f2f91d3 100644 --- a/packages/pg-query-stream/test/client-options.ts +++ b/packages/gaussdb-query-stream/test/client-options.ts @@ -1,4 +1,4 @@ -import pg from 'pg' +import pg from 'gaussdb' import assert from 'assert' import QueryStream from '../src' @@ -7,7 +7,6 @@ describe('client options', function () { const types = { getTypeParser: () => (string) => string, } - //@ts-expect-error const client = new pg.Client({ types }) client.connect() const stream = new QueryStream('SELECT * FROM generate_series(0, 10) num') diff --git a/packages/pg-query-stream/test/close.ts b/packages/gaussdb-query-stream/test/close.ts similarity index 100% rename from packages/pg-query-stream/test/close.ts rename to packages/gaussdb-query-stream/test/close.ts diff --git a/packages/pg-query-stream/test/concat.ts b/packages/gaussdb-query-stream/test/concat.ts similarity index 100% rename from packages/pg-query-stream/test/concat.ts rename to packages/gaussdb-query-stream/test/concat.ts diff --git a/packages/pg-query-stream/test/config.ts b/packages/gaussdb-query-stream/test/config.ts similarity index 100% rename from packages/pg-query-stream/test/config.ts rename to packages/gaussdb-query-stream/test/config.ts diff --git a/packages/pg-query-stream/test/empty-query.ts b/packages/gaussdb-query-stream/test/empty-query.ts similarity index 100% rename from packages/pg-query-stream/test/empty-query.ts rename to packages/gaussdb-query-stream/test/empty-query.ts diff --git a/packages/pg-query-stream/test/error.ts b/packages/gaussdb-query-stream/test/error.ts similarity index 99% rename from packages/pg-query-stream/test/error.ts rename to packages/gaussdb-query-stream/test/error.ts index bb9e89321..105820930 100644 --- a/packages/pg-query-stream/test/error.ts +++ b/packages/gaussdb-query-stream/test/error.ts @@ -1,7 +1,7 @@ import assert from 'assert' import helper from './helper' import QueryStream from '../src' -import { Pool, Client } from 'pg' +import { Pool, Client } from 'gaussdb' helper('error', function (client) { it('receives error on stream', function (done) { diff --git a/packages/pg-query-stream/test/fast-reader.ts b/packages/gaussdb-query-stream/test/fast-reader.ts similarity index 100% rename from packages/pg-query-stream/test/fast-reader.ts rename to packages/gaussdb-query-stream/test/fast-reader.ts diff --git a/packages/pg-query-stream/test/helper.ts b/packages/gaussdb-query-stream/test/helper.ts similarity index 91% rename from packages/pg-query-stream/test/helper.ts rename to packages/gaussdb-query-stream/test/helper.ts index 9e9b63a94..cf09e9c33 100644 --- a/packages/pg-query-stream/test/helper.ts +++ b/packages/gaussdb-query-stream/test/helper.ts @@ -1,4 +1,4 @@ -import pg from 'pg' +import pg from 'gaussdb' export default function (name, cb) { describe(name, function () { diff --git a/packages/pg-query-stream/test/instant.ts b/packages/gaussdb-query-stream/test/instant.ts similarity index 100% rename from packages/pg-query-stream/test/instant.ts rename to packages/gaussdb-query-stream/test/instant.ts diff --git a/packages/pg-query-stream/test/issue-3.ts b/packages/gaussdb-query-stream/test/issue-3.ts similarity index 97% rename from packages/pg-query-stream/test/issue-3.ts rename to packages/gaussdb-query-stream/test/issue-3.ts index 8c2c04455..511eb9584 100644 --- a/packages/pg-query-stream/test/issue-3.ts +++ b/packages/gaussdb-query-stream/test/issue-3.ts @@ -1,4 +1,4 @@ -import pg from 'pg' +import pg from 'gaussdb' import QueryStream from '../src' describe('end semantics race condition', function () { diff --git a/packages/pg-query-stream/test/passing-options.ts b/packages/gaussdb-query-stream/test/passing-options.ts similarity index 100% rename from packages/pg-query-stream/test/passing-options.ts rename to packages/gaussdb-query-stream/test/passing-options.ts diff --git a/packages/pg-query-stream/test/pauses.ts b/packages/gaussdb-query-stream/test/pauses.ts similarity index 100% rename from packages/pg-query-stream/test/pauses.ts rename to packages/gaussdb-query-stream/test/pauses.ts diff --git a/packages/pg-query-stream/test/slow-reader.ts b/packages/gaussdb-query-stream/test/slow-reader.ts similarity index 100% rename from packages/pg-query-stream/test/slow-reader.ts rename to packages/gaussdb-query-stream/test/slow-reader.ts diff --git a/packages/pg-query-stream/test/stream-tester-timestamp.ts b/packages/gaussdb-query-stream/test/stream-tester-timestamp.ts similarity index 100% rename from packages/pg-query-stream/test/stream-tester-timestamp.ts rename to packages/gaussdb-query-stream/test/stream-tester-timestamp.ts diff --git a/packages/pg-query-stream/test/stream-tester.ts b/packages/gaussdb-query-stream/test/stream-tester.ts similarity index 100% rename from packages/pg-query-stream/test/stream-tester.ts rename to packages/gaussdb-query-stream/test/stream-tester.ts diff --git a/packages/pg-query-stream/tsconfig.json b/packages/gaussdb-query-stream/tsconfig.json similarity index 100% rename from packages/pg-query-stream/tsconfig.json rename to packages/gaussdb-query-stream/tsconfig.json diff --git a/packages/pg/Makefile b/packages/gaussdb/Makefile similarity index 100% rename from packages/pg/Makefile rename to packages/gaussdb/Makefile diff --git a/packages/pg/README.md b/packages/gaussdb/README.md similarity index 100% rename from packages/pg/README.md rename to packages/gaussdb/README.md diff --git a/packages/pg/bench.js b/packages/gaussdb/bench.js similarity index 100% rename from packages/pg/bench.js rename to packages/gaussdb/bench.js diff --git a/packages/pg/esm/index.mjs b/packages/gaussdb/esm/index.mjs similarity index 100% rename from packages/pg/esm/index.mjs rename to packages/gaussdb/esm/index.mjs diff --git a/packages/pg/lib/client.js b/packages/gaussdb/lib/client.js similarity index 100% rename from packages/pg/lib/client.js rename to packages/gaussdb/lib/client.js diff --git a/packages/pg/lib/connection-parameters.js b/packages/gaussdb/lib/connection-parameters.js similarity index 98% rename from packages/pg/lib/connection-parameters.js rename to packages/gaussdb/lib/connection-parameters.js index a7b941c10..b7ec57346 100644 --- a/packages/pg/lib/connection-parameters.js +++ b/packages/gaussdb/lib/connection-parameters.js @@ -4,7 +4,7 @@ const dns = require('dns') const defaults = require('./defaults') -const parse = require('pg-connection-string').parse // parses a connection string +const parse = require('gaussdb-connection-string').parse // parses a connection string const val = function (key, config, envVar) { if (envVar === undefined) { diff --git a/packages/pg/lib/connection.js b/packages/gaussdb/lib/connection.js similarity index 98% rename from packages/pg/lib/connection.js rename to packages/gaussdb/lib/connection.js index 8045af858..5e2da11f8 100644 --- a/packages/pg/lib/connection.js +++ b/packages/gaussdb/lib/connection.js @@ -2,7 +2,7 @@ const EventEmitter = require('events').EventEmitter -const { parse, serialize } = require('pg-protocol') +const { parse, serialize } = require('gaussdb-protocol') const { getStream, getSecureStream } = require('./stream') const flushBuffer = serialize.flush() diff --git a/packages/pg/lib/crypto/cert-signatures.js b/packages/gaussdb/lib/crypto/cert-signatures.js similarity index 100% rename from packages/pg/lib/crypto/cert-signatures.js rename to packages/gaussdb/lib/crypto/cert-signatures.js diff --git a/packages/pg/lib/crypto/rfc5802.js b/packages/gaussdb/lib/crypto/rfc5802.js similarity index 100% rename from packages/pg/lib/crypto/rfc5802.js rename to packages/gaussdb/lib/crypto/rfc5802.js diff --git a/packages/pg/lib/crypto/sasl.js b/packages/gaussdb/lib/crypto/sasl.js similarity index 100% rename from packages/pg/lib/crypto/sasl.js rename to packages/gaussdb/lib/crypto/sasl.js diff --git a/packages/pg/lib/crypto/utils-legacy.js b/packages/gaussdb/lib/crypto/utils-legacy.js similarity index 100% rename from packages/pg/lib/crypto/utils-legacy.js rename to packages/gaussdb/lib/crypto/utils-legacy.js diff --git a/packages/pg/lib/crypto/utils-webcrypto.js b/packages/gaussdb/lib/crypto/utils-webcrypto.js similarity index 100% rename from packages/pg/lib/crypto/utils-webcrypto.js rename to packages/gaussdb/lib/crypto/utils-webcrypto.js diff --git a/packages/pg/lib/crypto/utils.js b/packages/gaussdb/lib/crypto/utils.js similarity index 100% rename from packages/pg/lib/crypto/utils.js rename to packages/gaussdb/lib/crypto/utils.js diff --git a/packages/pg/lib/defaults.js b/packages/gaussdb/lib/defaults.js similarity index 100% rename from packages/pg/lib/defaults.js rename to packages/gaussdb/lib/defaults.js diff --git a/packages/pg/lib/index.js b/packages/gaussdb/lib/index.js similarity index 94% rename from packages/pg/lib/index.js rename to packages/gaussdb/lib/index.js index 5bd73385b..0805d3cf0 100644 --- a/packages/pg/lib/index.js +++ b/packages/gaussdb/lib/index.js @@ -5,9 +5,9 @@ const defaults = require('./defaults') const Connection = require('./connection') const Result = require('./result') const utils = require('./utils') -const Pool = require('pg-pool') +const Pool = require('gaussdb-pool') const TypeOverrides = require('./type-overrides') -const { DatabaseError } = require('pg-protocol') +const { DatabaseError } = require('gaussdb-protocol') const { escapeIdentifier, escapeLiteral } = require('./utils') const poolFactory = (Client) => { diff --git a/packages/pg/lib/native/client.js b/packages/gaussdb/lib/native/client.js similarity index 100% rename from packages/pg/lib/native/client.js rename to packages/gaussdb/lib/native/client.js diff --git a/packages/pg/lib/native/index.js b/packages/gaussdb/lib/native/index.js similarity index 100% rename from packages/pg/lib/native/index.js rename to packages/gaussdb/lib/native/index.js diff --git a/packages/pg/lib/native/query.js b/packages/gaussdb/lib/native/query.js similarity index 100% rename from packages/pg/lib/native/query.js rename to packages/gaussdb/lib/native/query.js diff --git a/packages/pg/lib/query.js b/packages/gaussdb/lib/query.js similarity index 100% rename from packages/pg/lib/query.js rename to packages/gaussdb/lib/query.js diff --git a/packages/pg/lib/result.js b/packages/gaussdb/lib/result.js similarity index 100% rename from packages/pg/lib/result.js rename to packages/gaussdb/lib/result.js diff --git a/packages/pg/lib/stream.js b/packages/gaussdb/lib/stream.js similarity index 97% rename from packages/pg/lib/stream.js rename to packages/gaussdb/lib/stream.js index edc301833..0ea46c23c 100644 --- a/packages/pg/lib/stream.js +++ b/packages/gaussdb/lib/stream.js @@ -38,7 +38,7 @@ function getNodejsStreamFuncs() { */ function getCloudflareStreamFuncs() { function getStream(ssl) { - const { CloudflareSocket } = require('pg-cloudflare') + const { CloudflareSocket } = require('gaussdb-cloudflare') return new CloudflareSocket(ssl) } diff --git a/packages/pg/lib/type-overrides.js b/packages/gaussdb/lib/type-overrides.js similarity index 100% rename from packages/pg/lib/type-overrides.js rename to packages/gaussdb/lib/type-overrides.js diff --git a/packages/pg/lib/utils.js b/packages/gaussdb/lib/utils.js similarity index 100% rename from packages/pg/lib/utils.js rename to packages/gaussdb/lib/utils.js diff --git a/packages/pg/package.json b/packages/gaussdb/package.json similarity index 70% rename from packages/pg/package.json rename to packages/gaussdb/package.json index 1abdcd648..3d1f3f44a 100644 --- a/packages/pg/package.json +++ b/packages/gaussdb/package.json @@ -1,21 +1,18 @@ { - "name": "pg", + "name": "gaussdb", "version": "8.16.0", - "description": "PostgreSQL client - pure javascript & libpq with the same API", + "description": "GaussDB client - pure javascript & libpq with the same API", "keywords": [ "database", "libpq", - "pg", - "postgre", - "postgres", - "postgresql", + "gaussdb", "rdbms" ], - "homepage": "https://github.com/brianc/node-postgres", + "homepage": "https://github.com/HuaweiCloudDeveloper/gaussdb-node", "repository": { "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git", + "directory": "packages/gaussdb" }, "author": "Brian Carlson ", "main": "./lib", @@ -23,7 +20,7 @@ ".": { "import": "./esm/index.mjs", "require": "./lib/index.js", - "default": "./lib/index.js" + "default": "./lib/index.js" }, "./lib/*": { "import": "./lib/*", @@ -32,9 +29,9 @@ } }, "dependencies": { - "pg-connection-string": "^2.9.0", - "pg-pool": "^3.10.0", - "pg-protocol": "^1.10.0", + "gaussdb-connection-string": "^2.9.0", + "gaussdb-pool": "^3.10.0", + "gaussdb-protocol": "^1.10.0", "pg-types": "2.2.0", "pgpass": "1.0.5" }, @@ -50,7 +47,7 @@ "wrangler": "^3.x" }, "optionalDependencies": { - "pg-cloudflare": "^1.2.5" + "gaussdb-cloudflare": "^1.2.5" }, "peerDependencies": { "pg-native": ">=3.0.1" diff --git a/packages/pg/script/create-test-tables.js b/packages/gaussdb/script/create-test-tables.js similarity index 100% rename from packages/pg/script/create-test-tables.js rename to packages/gaussdb/script/create-test-tables.js diff --git a/packages/pg/script/dump-db-types.js b/packages/gaussdb/script/dump-db-types.js similarity index 100% rename from packages/pg/script/dump-db-types.js rename to packages/gaussdb/script/dump-db-types.js diff --git a/packages/pg/test/buffer-list.js b/packages/gaussdb/test/buffer-list.js similarity index 100% rename from packages/pg/test/buffer-list.js rename to packages/gaussdb/test/buffer-list.js diff --git a/packages/pg/test/cli.js b/packages/gaussdb/test/cli.js similarity index 100% rename from packages/pg/test/cli.js rename to packages/gaussdb/test/cli.js diff --git a/packages/pg/test/cloudflare/vitest-cf.test.ts b/packages/gaussdb/test/cloudflare/vitest-cf.test.ts similarity index 90% rename from packages/pg/test/cloudflare/vitest-cf.test.ts rename to packages/gaussdb/test/cloudflare/vitest-cf.test.ts index 177f0aedf..ac3708a62 100644 --- a/packages/pg/test/cloudflare/vitest-cf.test.ts +++ b/packages/gaussdb/test/cloudflare/vitest-cf.test.ts @@ -1,4 +1,4 @@ -import { Pool } from 'pg' +import { Pool } from 'gaussdb' import { test } from 'vitest' import assert from 'node:assert' import args from '../cli' diff --git a/packages/pg/test/integration/client/api-tests.js b/packages/gaussdb/test/integration/client/api-tests.js similarity index 100% rename from packages/pg/test/integration/client/api-tests.js rename to packages/gaussdb/test/integration/client/api-tests.js diff --git a/packages/pg/test/integration/client/appname-tests.js b/packages/gaussdb/test/integration/client/appname-tests.js similarity index 100% rename from packages/pg/test/integration/client/appname-tests.js rename to packages/gaussdb/test/integration/client/appname-tests.js diff --git a/packages/pg/test/integration/client/array-tests.js b/packages/gaussdb/test/integration/client/array-tests.js similarity index 100% rename from packages/pg/test/integration/client/array-tests.js rename to packages/gaussdb/test/integration/client/array-tests.js diff --git a/packages/pg/test/integration/client/async-stack-trace-tests.js b/packages/gaussdb/test/integration/client/async-stack-trace-tests.js similarity index 100% rename from packages/pg/test/integration/client/async-stack-trace-tests.js rename to packages/gaussdb/test/integration/client/async-stack-trace-tests.js diff --git a/packages/pg/test/integration/client/big-simple-query-tests.js b/packages/gaussdb/test/integration/client/big-simple-query-tests.js similarity index 100% rename from packages/pg/test/integration/client/big-simple-query-tests.js rename to packages/gaussdb/test/integration/client/big-simple-query-tests.js diff --git a/packages/pg/test/integration/client/configuration-tests.js b/packages/gaussdb/test/integration/client/configuration-tests.js similarity index 100% rename from packages/pg/test/integration/client/configuration-tests.js rename to packages/gaussdb/test/integration/client/configuration-tests.js diff --git a/packages/pg/test/integration/client/connection-parameter-tests.js b/packages/gaussdb/test/integration/client/connection-parameter-tests.js similarity index 100% rename from packages/pg/test/integration/client/connection-parameter-tests.js rename to packages/gaussdb/test/integration/client/connection-parameter-tests.js diff --git a/packages/pg/test/integration/client/connection-timeout-tests.js b/packages/gaussdb/test/integration/client/connection-timeout-tests.js similarity index 100% rename from packages/pg/test/integration/client/connection-timeout-tests.js rename to packages/gaussdb/test/integration/client/connection-timeout-tests.js diff --git a/packages/pg/test/integration/client/custom-types-tests.js b/packages/gaussdb/test/integration/client/custom-types-tests.js similarity index 100% rename from packages/pg/test/integration/client/custom-types-tests.js rename to packages/gaussdb/test/integration/client/custom-types-tests.js diff --git a/packages/pg/test/integration/client/empty-query-tests.js b/packages/gaussdb/test/integration/client/empty-query-tests.js similarity index 100% rename from packages/pg/test/integration/client/empty-query-tests.js rename to packages/gaussdb/test/integration/client/empty-query-tests.js diff --git a/packages/pg/test/integration/client/error-handling-tests.js b/packages/gaussdb/test/integration/client/error-handling-tests.js similarity index 100% rename from packages/pg/test/integration/client/error-handling-tests.js rename to packages/gaussdb/test/integration/client/error-handling-tests.js diff --git a/packages/pg/test/integration/client/field-name-escape-tests.js b/packages/gaussdb/test/integration/client/field-name-escape-tests.js similarity index 100% rename from packages/pg/test/integration/client/field-name-escape-tests.js rename to packages/gaussdb/test/integration/client/field-name-escape-tests.js diff --git a/packages/pg/test/integration/client/huge-numeric-tests.js b/packages/gaussdb/test/integration/client/huge-numeric-tests.js similarity index 100% rename from packages/pg/test/integration/client/huge-numeric-tests.js rename to packages/gaussdb/test/integration/client/huge-numeric-tests.js diff --git a/packages/pg/test/integration/client/idle_in_transaction_session_timeout-tests.js b/packages/gaussdb/test/integration/client/idle_in_transaction_session_timeout-tests.js similarity index 100% rename from packages/pg/test/integration/client/idle_in_transaction_session_timeout-tests.js rename to packages/gaussdb/test/integration/client/idle_in_transaction_session_timeout-tests.js diff --git a/packages/pg/test/integration/client/json-type-parsing-tests.js b/packages/gaussdb/test/integration/client/json-type-parsing-tests.js similarity index 100% rename from packages/pg/test/integration/client/json-type-parsing-tests.js rename to packages/gaussdb/test/integration/client/json-type-parsing-tests.js diff --git a/packages/pg/test/integration/client/multiple-results-tests.js b/packages/gaussdb/test/integration/client/multiple-results-tests.js similarity index 100% rename from packages/pg/test/integration/client/multiple-results-tests.js rename to packages/gaussdb/test/integration/client/multiple-results-tests.js diff --git a/packages/pg/test/integration/client/network-partition-tests.js b/packages/gaussdb/test/integration/client/network-partition-tests.js similarity index 100% rename from packages/pg/test/integration/client/network-partition-tests.js rename to packages/gaussdb/test/integration/client/network-partition-tests.js diff --git a/packages/pg/test/integration/client/no-data-tests.js b/packages/gaussdb/test/integration/client/no-data-tests.js similarity index 100% rename from packages/pg/test/integration/client/no-data-tests.js rename to packages/gaussdb/test/integration/client/no-data-tests.js diff --git a/packages/pg/test/integration/client/no-row-result-tests.js b/packages/gaussdb/test/integration/client/no-row-result-tests.js similarity index 100% rename from packages/pg/test/integration/client/no-row-result-tests.js rename to packages/gaussdb/test/integration/client/no-row-result-tests.js diff --git a/packages/pg/test/integration/client/notice-tests.js b/packages/gaussdb/test/integration/client/notice-tests.js similarity index 100% rename from packages/pg/test/integration/client/notice-tests.js rename to packages/gaussdb/test/integration/client/notice-tests.js diff --git a/packages/pg/test/integration/client/parse-int-8-tests.js b/packages/gaussdb/test/integration/client/parse-int-8-tests.js similarity index 100% rename from packages/pg/test/integration/client/parse-int-8-tests.js rename to packages/gaussdb/test/integration/client/parse-int-8-tests.js diff --git a/packages/pg/test/integration/client/prepared-statement-tests.js b/packages/gaussdb/test/integration/client/prepared-statement-tests.js similarity index 100% rename from packages/pg/test/integration/client/prepared-statement-tests.js rename to packages/gaussdb/test/integration/client/prepared-statement-tests.js diff --git a/packages/pg/test/integration/client/promise-api-tests.js b/packages/gaussdb/test/integration/client/promise-api-tests.js similarity index 100% rename from packages/pg/test/integration/client/promise-api-tests.js rename to packages/gaussdb/test/integration/client/promise-api-tests.js diff --git a/packages/pg/test/integration/client/query-as-promise-tests.js b/packages/gaussdb/test/integration/client/query-as-promise-tests.js similarity index 100% rename from packages/pg/test/integration/client/query-as-promise-tests.js rename to packages/gaussdb/test/integration/client/query-as-promise-tests.js diff --git a/packages/pg/test/integration/client/query-column-names-tests.js b/packages/gaussdb/test/integration/client/query-column-names-tests.js similarity index 100% rename from packages/pg/test/integration/client/query-column-names-tests.js rename to packages/gaussdb/test/integration/client/query-column-names-tests.js diff --git a/packages/pg/test/integration/client/query-error-handling-prepared-statement-tests.js b/packages/gaussdb/test/integration/client/query-error-handling-prepared-statement-tests.js similarity index 100% rename from packages/pg/test/integration/client/query-error-handling-prepared-statement-tests.js rename to packages/gaussdb/test/integration/client/query-error-handling-prepared-statement-tests.js diff --git a/packages/pg/test/integration/client/query-error-handling-tests.js b/packages/gaussdb/test/integration/client/query-error-handling-tests.js similarity index 100% rename from packages/pg/test/integration/client/query-error-handling-tests.js rename to packages/gaussdb/test/integration/client/query-error-handling-tests.js diff --git a/packages/pg/test/integration/client/quick-disconnect-tests.js b/packages/gaussdb/test/integration/client/quick-disconnect-tests.js similarity index 100% rename from packages/pg/test/integration/client/quick-disconnect-tests.js rename to packages/gaussdb/test/integration/client/quick-disconnect-tests.js diff --git a/packages/pg/test/integration/client/result-metadata-tests.js b/packages/gaussdb/test/integration/client/result-metadata-tests.js similarity index 100% rename from packages/pg/test/integration/client/result-metadata-tests.js rename to packages/gaussdb/test/integration/client/result-metadata-tests.js diff --git a/packages/pg/test/integration/client/results-as-array-tests.js b/packages/gaussdb/test/integration/client/results-as-array-tests.js similarity index 100% rename from packages/pg/test/integration/client/results-as-array-tests.js rename to packages/gaussdb/test/integration/client/results-as-array-tests.js diff --git a/packages/pg/test/integration/client/row-description-on-results-tests.js b/packages/gaussdb/test/integration/client/row-description-on-results-tests.js similarity index 100% rename from packages/pg/test/integration/client/row-description-on-results-tests.js rename to packages/gaussdb/test/integration/client/row-description-on-results-tests.js diff --git a/packages/pg/test/integration/client/sasl-scram-tests.js b/packages/gaussdb/test/integration/client/sasl-scram-tests.js similarity index 100% rename from packages/pg/test/integration/client/sasl-scram-tests.js rename to packages/gaussdb/test/integration/client/sasl-scram-tests.js diff --git a/packages/pg/test/integration/client/sha256-password-tests.js b/packages/gaussdb/test/integration/client/sha256-password-tests.js similarity index 100% rename from packages/pg/test/integration/client/sha256-password-tests.js rename to packages/gaussdb/test/integration/client/sha256-password-tests.js diff --git a/packages/pg/test/integration/client/simple-query-tests.js b/packages/gaussdb/test/integration/client/simple-query-tests.js similarity index 100% rename from packages/pg/test/integration/client/simple-query-tests.js rename to packages/gaussdb/test/integration/client/simple-query-tests.js diff --git a/packages/pg/test/integration/client/ssl-tests.js b/packages/gaussdb/test/integration/client/ssl-tests.js similarity index 100% rename from packages/pg/test/integration/client/ssl-tests.js rename to packages/gaussdb/test/integration/client/ssl-tests.js diff --git a/packages/pg/test/integration/client/statement_timeout-tests.js b/packages/gaussdb/test/integration/client/statement_timeout-tests.js similarity index 100% rename from packages/pg/test/integration/client/statement_timeout-tests.js rename to packages/gaussdb/test/integration/client/statement_timeout-tests.js diff --git a/packages/pg/test/integration/client/test-helper.js b/packages/gaussdb/test/integration/client/test-helper.js similarity index 100% rename from packages/pg/test/integration/client/test-helper.js rename to packages/gaussdb/test/integration/client/test-helper.js diff --git a/packages/pg/test/integration/client/timezone-tests.js b/packages/gaussdb/test/integration/client/timezone-tests.js similarity index 100% rename from packages/pg/test/integration/client/timezone-tests.js rename to packages/gaussdb/test/integration/client/timezone-tests.js diff --git a/packages/pg/test/integration/client/transaction-tests.js b/packages/gaussdb/test/integration/client/transaction-tests.js similarity index 100% rename from packages/pg/test/integration/client/transaction-tests.js rename to packages/gaussdb/test/integration/client/transaction-tests.js diff --git a/packages/pg/test/integration/client/type-coercion-tests.js b/packages/gaussdb/test/integration/client/type-coercion-tests.js similarity index 100% rename from packages/pg/test/integration/client/type-coercion-tests.js rename to packages/gaussdb/test/integration/client/type-coercion-tests.js diff --git a/packages/pg/test/integration/client/type-parser-override-tests.js b/packages/gaussdb/test/integration/client/type-parser-override-tests.js similarity index 100% rename from packages/pg/test/integration/client/type-parser-override-tests.js rename to packages/gaussdb/test/integration/client/type-parser-override-tests.js diff --git a/packages/pg/test/integration/connection-pool/connection-pool-size-tests.js b/packages/gaussdb/test/integration/connection-pool/connection-pool-size-tests.js similarity index 100% rename from packages/pg/test/integration/connection-pool/connection-pool-size-tests.js rename to packages/gaussdb/test/integration/connection-pool/connection-pool-size-tests.js diff --git a/packages/pg/test/integration/connection-pool/error-tests.js b/packages/gaussdb/test/integration/connection-pool/error-tests.js similarity index 100% rename from packages/pg/test/integration/connection-pool/error-tests.js rename to packages/gaussdb/test/integration/connection-pool/error-tests.js diff --git a/packages/pg/test/integration/connection-pool/idle-timeout-tests.js b/packages/gaussdb/test/integration/connection-pool/idle-timeout-tests.js similarity index 100% rename from packages/pg/test/integration/connection-pool/idle-timeout-tests.js rename to packages/gaussdb/test/integration/connection-pool/idle-timeout-tests.js diff --git a/packages/pg/test/integration/connection-pool/native-instance-tests.js b/packages/gaussdb/test/integration/connection-pool/native-instance-tests.js similarity index 100% rename from packages/pg/test/integration/connection-pool/native-instance-tests.js rename to packages/gaussdb/test/integration/connection-pool/native-instance-tests.js diff --git a/packages/pg/test/integration/connection-pool/test-helper.js b/packages/gaussdb/test/integration/connection-pool/test-helper.js similarity index 100% rename from packages/pg/test/integration/connection-pool/test-helper.js rename to packages/gaussdb/test/integration/connection-pool/test-helper.js diff --git a/packages/pg/test/integration/connection-pool/tls-tests.js b/packages/gaussdb/test/integration/connection-pool/tls-tests.js similarity index 100% rename from packages/pg/test/integration/connection-pool/tls-tests.js rename to packages/gaussdb/test/integration/connection-pool/tls-tests.js diff --git a/packages/pg/test/integration/connection-pool/yield-support-tests.js b/packages/gaussdb/test/integration/connection-pool/yield-support-tests.js similarity index 100% rename from packages/pg/test/integration/connection-pool/yield-support-tests.js rename to packages/gaussdb/test/integration/connection-pool/yield-support-tests.js diff --git a/packages/pg/test/integration/domain-tests.js b/packages/gaussdb/test/integration/domain-tests.js similarity index 100% rename from packages/pg/test/integration/domain-tests.js rename to packages/gaussdb/test/integration/domain-tests.js diff --git a/packages/pg/test/integration/gh-issues/1105-tests.js b/packages/gaussdb/test/integration/gh-issues/1105-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/1105-tests.js rename to packages/gaussdb/test/integration/gh-issues/1105-tests.js diff --git a/packages/pg/test/integration/gh-issues/130-tests.js b/packages/gaussdb/test/integration/gh-issues/130-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/130-tests.js rename to packages/gaussdb/test/integration/gh-issues/130-tests.js diff --git a/packages/pg/test/integration/gh-issues/131-tests.js b/packages/gaussdb/test/integration/gh-issues/131-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/131-tests.js rename to packages/gaussdb/test/integration/gh-issues/131-tests.js diff --git a/packages/pg/test/integration/gh-issues/1382-tests.js b/packages/gaussdb/test/integration/gh-issues/1382-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/1382-tests.js rename to packages/gaussdb/test/integration/gh-issues/1382-tests.js diff --git a/packages/pg/test/integration/gh-issues/1542-tests.js b/packages/gaussdb/test/integration/gh-issues/1542-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/1542-tests.js rename to packages/gaussdb/test/integration/gh-issues/1542-tests.js diff --git a/packages/pg/test/integration/gh-issues/1854-tests.js b/packages/gaussdb/test/integration/gh-issues/1854-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/1854-tests.js rename to packages/gaussdb/test/integration/gh-issues/1854-tests.js diff --git a/packages/pg/test/integration/gh-issues/199-tests.js b/packages/gaussdb/test/integration/gh-issues/199-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/199-tests.js rename to packages/gaussdb/test/integration/gh-issues/199-tests.js diff --git a/packages/pg/test/integration/gh-issues/1992-tests.js b/packages/gaussdb/test/integration/gh-issues/1992-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/1992-tests.js rename to packages/gaussdb/test/integration/gh-issues/1992-tests.js diff --git a/packages/pg/test/integration/gh-issues/2056-tests.js b/packages/gaussdb/test/integration/gh-issues/2056-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2056-tests.js rename to packages/gaussdb/test/integration/gh-issues/2056-tests.js diff --git a/packages/pg/test/integration/gh-issues/2064-tests.js b/packages/gaussdb/test/integration/gh-issues/2064-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2064-tests.js rename to packages/gaussdb/test/integration/gh-issues/2064-tests.js diff --git a/packages/pg/test/integration/gh-issues/2079-tests.js b/packages/gaussdb/test/integration/gh-issues/2079-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2079-tests.js rename to packages/gaussdb/test/integration/gh-issues/2079-tests.js diff --git a/packages/pg/test/integration/gh-issues/2085-tests.js b/packages/gaussdb/test/integration/gh-issues/2085-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2085-tests.js rename to packages/gaussdb/test/integration/gh-issues/2085-tests.js diff --git a/packages/pg/test/integration/gh-issues/2108-tests.js b/packages/gaussdb/test/integration/gh-issues/2108-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2108-tests.js rename to packages/gaussdb/test/integration/gh-issues/2108-tests.js diff --git a/packages/pg/test/integration/gh-issues/2303-tests.js b/packages/gaussdb/test/integration/gh-issues/2303-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2303-tests.js rename to packages/gaussdb/test/integration/gh-issues/2303-tests.js diff --git a/packages/pg/test/integration/gh-issues/2307-tests.js b/packages/gaussdb/test/integration/gh-issues/2307-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2307-tests.js rename to packages/gaussdb/test/integration/gh-issues/2307-tests.js diff --git a/packages/pg/test/integration/gh-issues/2416-tests.js b/packages/gaussdb/test/integration/gh-issues/2416-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2416-tests.js rename to packages/gaussdb/test/integration/gh-issues/2416-tests.js diff --git a/packages/pg/test/integration/gh-issues/2556-tests.js b/packages/gaussdb/test/integration/gh-issues/2556-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2556-tests.js rename to packages/gaussdb/test/integration/gh-issues/2556-tests.js diff --git a/packages/pg/test/integration/gh-issues/2627-tests.js b/packages/gaussdb/test/integration/gh-issues/2627-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2627-tests.js rename to packages/gaussdb/test/integration/gh-issues/2627-tests.js diff --git a/packages/pg/test/integration/gh-issues/2716-tests.js b/packages/gaussdb/test/integration/gh-issues/2716-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/2716-tests.js rename to packages/gaussdb/test/integration/gh-issues/2716-tests.js diff --git a/packages/pg/test/integration/gh-issues/3062-tests.js b/packages/gaussdb/test/integration/gh-issues/3062-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/3062-tests.js rename to packages/gaussdb/test/integration/gh-issues/3062-tests.js diff --git a/packages/pg/test/integration/gh-issues/3174-tests.js b/packages/gaussdb/test/integration/gh-issues/3174-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/3174-tests.js rename to packages/gaussdb/test/integration/gh-issues/3174-tests.js diff --git a/packages/pg/test/integration/gh-issues/507-tests.js b/packages/gaussdb/test/integration/gh-issues/507-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/507-tests.js rename to packages/gaussdb/test/integration/gh-issues/507-tests.js diff --git a/packages/pg/test/integration/gh-issues/600-tests.js b/packages/gaussdb/test/integration/gh-issues/600-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/600-tests.js rename to packages/gaussdb/test/integration/gh-issues/600-tests.js diff --git a/packages/pg/test/integration/gh-issues/675-tests.js b/packages/gaussdb/test/integration/gh-issues/675-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/675-tests.js rename to packages/gaussdb/test/integration/gh-issues/675-tests.js diff --git a/packages/pg/test/integration/gh-issues/699-tests.js b/packages/gaussdb/test/integration/gh-issues/699-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/699-tests.js rename to packages/gaussdb/test/integration/gh-issues/699-tests.js diff --git a/packages/pg/test/integration/gh-issues/787-tests.js b/packages/gaussdb/test/integration/gh-issues/787-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/787-tests.js rename to packages/gaussdb/test/integration/gh-issues/787-tests.js diff --git a/packages/pg/test/integration/gh-issues/882-tests.js b/packages/gaussdb/test/integration/gh-issues/882-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/882-tests.js rename to packages/gaussdb/test/integration/gh-issues/882-tests.js diff --git a/packages/pg/test/integration/gh-issues/981-tests.js b/packages/gaussdb/test/integration/gh-issues/981-tests.js similarity index 100% rename from packages/pg/test/integration/gh-issues/981-tests.js rename to packages/gaussdb/test/integration/gh-issues/981-tests.js diff --git a/packages/pg/test/integration/test-helper.js b/packages/gaussdb/test/integration/test-helper.js similarity index 100% rename from packages/pg/test/integration/test-helper.js rename to packages/gaussdb/test/integration/test-helper.js diff --git a/packages/pg/test/native/callback-api-tests.js b/packages/gaussdb/test/native/callback-api-tests.js similarity index 100% rename from packages/pg/test/native/callback-api-tests.js rename to packages/gaussdb/test/native/callback-api-tests.js diff --git a/packages/pg/test/native/evented-api-tests.js b/packages/gaussdb/test/native/evented-api-tests.js similarity index 100% rename from packages/pg/test/native/evented-api-tests.js rename to packages/gaussdb/test/native/evented-api-tests.js diff --git a/packages/pg/test/native/native-connection-string-tests.js b/packages/gaussdb/test/native/native-connection-string-tests.js similarity index 100% rename from packages/pg/test/native/native-connection-string-tests.js rename to packages/gaussdb/test/native/native-connection-string-tests.js diff --git a/packages/pg/test/native/native-vs-js-error-tests.js b/packages/gaussdb/test/native/native-vs-js-error-tests.js similarity index 100% rename from packages/pg/test/native/native-vs-js-error-tests.js rename to packages/gaussdb/test/native/native-vs-js-error-tests.js diff --git a/packages/pg/test/native/stress-tests.js b/packages/gaussdb/test/native/stress-tests.js similarity index 100% rename from packages/pg/test/native/stress-tests.js rename to packages/gaussdb/test/native/stress-tests.js diff --git a/packages/pg/test/suite.js b/packages/gaussdb/test/suite.js similarity index 100% rename from packages/pg/test/suite.js rename to packages/gaussdb/test/suite.js diff --git a/packages/pg/test/test-buffers.js b/packages/gaussdb/test/test-buffers.js similarity index 100% rename from packages/pg/test/test-buffers.js rename to packages/gaussdb/test/test-buffers.js diff --git a/packages/pg/test/test-helper.js b/packages/gaussdb/test/test-helper.js similarity index 100% rename from packages/pg/test/test-helper.js rename to packages/gaussdb/test/test-helper.js diff --git a/packages/pg/test/tls/GNUmakefile b/packages/gaussdb/test/tls/GNUmakefile similarity index 100% rename from packages/pg/test/tls/GNUmakefile rename to packages/gaussdb/test/tls/GNUmakefile diff --git a/packages/pg/test/tls/test-client-ca.crt b/packages/gaussdb/test/tls/test-client-ca.crt similarity index 100% rename from packages/pg/test/tls/test-client-ca.crt rename to packages/gaussdb/test/tls/test-client-ca.crt diff --git a/packages/pg/test/tls/test-client-ca.key b/packages/gaussdb/test/tls/test-client-ca.key similarity index 100% rename from packages/pg/test/tls/test-client-ca.key rename to packages/gaussdb/test/tls/test-client-ca.key diff --git a/packages/pg/test/tls/test-client.crt b/packages/gaussdb/test/tls/test-client.crt similarity index 100% rename from packages/pg/test/tls/test-client.crt rename to packages/gaussdb/test/tls/test-client.crt diff --git a/packages/pg/test/tls/test-client.key b/packages/gaussdb/test/tls/test-client.key similarity index 100% rename from packages/pg/test/tls/test-client.key rename to packages/gaussdb/test/tls/test-client.key diff --git a/packages/pg/test/tls/test-server-ca.crt b/packages/gaussdb/test/tls/test-server-ca.crt similarity index 100% rename from packages/pg/test/tls/test-server-ca.crt rename to packages/gaussdb/test/tls/test-server-ca.crt diff --git a/packages/pg/test/tls/test-server-ca.key b/packages/gaussdb/test/tls/test-server-ca.key similarity index 100% rename from packages/pg/test/tls/test-server-ca.key rename to packages/gaussdb/test/tls/test-server-ca.key diff --git a/packages/pg/test/tls/test-server.crt b/packages/gaussdb/test/tls/test-server.crt similarity index 100% rename from packages/pg/test/tls/test-server.crt rename to packages/gaussdb/test/tls/test-server.crt diff --git a/packages/pg/test/tls/test-server.key b/packages/gaussdb/test/tls/test-server.key similarity index 100% rename from packages/pg/test/tls/test-server.key rename to packages/gaussdb/test/tls/test-server.key diff --git a/packages/pg/test/unit/client/cleartext-password-tests.js b/packages/gaussdb/test/unit/client/cleartext-password-tests.js similarity index 100% rename from packages/pg/test/unit/client/cleartext-password-tests.js rename to packages/gaussdb/test/unit/client/cleartext-password-tests.js diff --git a/packages/pg/test/unit/client/configuration-tests.js b/packages/gaussdb/test/unit/client/configuration-tests.js similarity index 100% rename from packages/pg/test/unit/client/configuration-tests.js rename to packages/gaussdb/test/unit/client/configuration-tests.js diff --git a/packages/pg/test/unit/client/early-disconnect-tests.js b/packages/gaussdb/test/unit/client/early-disconnect-tests.js similarity index 100% rename from packages/pg/test/unit/client/early-disconnect-tests.js rename to packages/gaussdb/test/unit/client/early-disconnect-tests.js diff --git a/packages/pg/test/unit/client/escape-tests.js b/packages/gaussdb/test/unit/client/escape-tests.js similarity index 100% rename from packages/pg/test/unit/client/escape-tests.js rename to packages/gaussdb/test/unit/client/escape-tests.js diff --git a/packages/pg/test/unit/client/md5-password-tests.js b/packages/gaussdb/test/unit/client/md5-password-tests.js similarity index 100% rename from packages/pg/test/unit/client/md5-password-tests.js rename to packages/gaussdb/test/unit/client/md5-password-tests.js diff --git a/packages/pg/test/unit/client/notification-tests.js b/packages/gaussdb/test/unit/client/notification-tests.js similarity index 100% rename from packages/pg/test/unit/client/notification-tests.js rename to packages/gaussdb/test/unit/client/notification-tests.js diff --git a/packages/pg/test/unit/client/pgpass.file b/packages/gaussdb/test/unit/client/pgpass.file similarity index 100% rename from packages/pg/test/unit/client/pgpass.file rename to packages/gaussdb/test/unit/client/pgpass.file diff --git a/packages/pg/test/unit/client/prepared-statement-tests.js b/packages/gaussdb/test/unit/client/prepared-statement-tests.js similarity index 100% rename from packages/pg/test/unit/client/prepared-statement-tests.js rename to packages/gaussdb/test/unit/client/prepared-statement-tests.js diff --git a/packages/pg/test/unit/client/query-queue-tests.js b/packages/gaussdb/test/unit/client/query-queue-tests.js similarity index 100% rename from packages/pg/test/unit/client/query-queue-tests.js rename to packages/gaussdb/test/unit/client/query-queue-tests.js diff --git a/packages/pg/test/unit/client/result-metadata-tests.js b/packages/gaussdb/test/unit/client/result-metadata-tests.js similarity index 100% rename from packages/pg/test/unit/client/result-metadata-tests.js rename to packages/gaussdb/test/unit/client/result-metadata-tests.js diff --git a/packages/pg/test/unit/client/sasl-scram-tests.js b/packages/gaussdb/test/unit/client/sasl-scram-tests.js similarity index 100% rename from packages/pg/test/unit/client/sasl-scram-tests.js rename to packages/gaussdb/test/unit/client/sasl-scram-tests.js diff --git a/packages/pg/test/unit/client/set-keepalives-tests.js b/packages/gaussdb/test/unit/client/set-keepalives-tests.js similarity index 100% rename from packages/pg/test/unit/client/set-keepalives-tests.js rename to packages/gaussdb/test/unit/client/set-keepalives-tests.js diff --git a/packages/pg/test/unit/client/sha256-password-tests.js b/packages/gaussdb/test/unit/client/sha256-password-tests.js similarity index 100% rename from packages/pg/test/unit/client/sha256-password-tests.js rename to packages/gaussdb/test/unit/client/sha256-password-tests.js diff --git a/packages/pg/test/unit/client/simple-query-tests.js b/packages/gaussdb/test/unit/client/simple-query-tests.js similarity index 100% rename from packages/pg/test/unit/client/simple-query-tests.js rename to packages/gaussdb/test/unit/client/simple-query-tests.js diff --git a/packages/pg/test/unit/client/stream-and-query-error-interaction-tests.js b/packages/gaussdb/test/unit/client/stream-and-query-error-interaction-tests.js similarity index 100% rename from packages/pg/test/unit/client/stream-and-query-error-interaction-tests.js rename to packages/gaussdb/test/unit/client/stream-and-query-error-interaction-tests.js diff --git a/packages/pg/test/unit/client/test-helper.js b/packages/gaussdb/test/unit/client/test-helper.js similarity index 100% rename from packages/pg/test/unit/client/test-helper.js rename to packages/gaussdb/test/unit/client/test-helper.js diff --git a/packages/pg/test/unit/client/throw-in-type-parser-tests.js b/packages/gaussdb/test/unit/client/throw-in-type-parser-tests.js similarity index 100% rename from packages/pg/test/unit/client/throw-in-type-parser-tests.js rename to packages/gaussdb/test/unit/client/throw-in-type-parser-tests.js diff --git a/packages/pg/test/unit/connection-parameters/creation-tests.js b/packages/gaussdb/test/unit/connection-parameters/creation-tests.js similarity index 100% rename from packages/pg/test/unit/connection-parameters/creation-tests.js rename to packages/gaussdb/test/unit/connection-parameters/creation-tests.js diff --git a/packages/pg/test/unit/connection-parameters/environment-variable-tests.js b/packages/gaussdb/test/unit/connection-parameters/environment-variable-tests.js similarity index 100% rename from packages/pg/test/unit/connection-parameters/environment-variable-tests.js rename to packages/gaussdb/test/unit/connection-parameters/environment-variable-tests.js diff --git a/packages/pg/test/unit/connection-pool/configuration-tests.js b/packages/gaussdb/test/unit/connection-pool/configuration-tests.js similarity index 100% rename from packages/pg/test/unit/connection-pool/configuration-tests.js rename to packages/gaussdb/test/unit/connection-pool/configuration-tests.js diff --git a/packages/pg/test/unit/connection/error-tests.js b/packages/gaussdb/test/unit/connection/error-tests.js similarity index 100% rename from packages/pg/test/unit/connection/error-tests.js rename to packages/gaussdb/test/unit/connection/error-tests.js diff --git a/packages/pg/test/unit/connection/startup-tests.js b/packages/gaussdb/test/unit/connection/startup-tests.js similarity index 100% rename from packages/pg/test/unit/connection/startup-tests.js rename to packages/gaussdb/test/unit/connection/startup-tests.js diff --git a/packages/pg/test/unit/connection/test-helper.js b/packages/gaussdb/test/unit/connection/test-helper.js similarity index 100% rename from packages/pg/test/unit/connection/test-helper.js rename to packages/gaussdb/test/unit/connection/test-helper.js diff --git a/packages/pg/test/unit/test-helper.js b/packages/gaussdb/test/unit/test-helper.js similarity index 100% rename from packages/pg/test/unit/test-helper.js rename to packages/gaussdb/test/unit/test-helper.js diff --git a/packages/pg/test/unit/utils-tests.js b/packages/gaussdb/test/unit/utils-tests.js similarity index 100% rename from packages/pg/test/unit/utils-tests.js rename to packages/gaussdb/test/unit/utils-tests.js diff --git a/packages/pg/test/vitest.config.mts b/packages/gaussdb/test/vitest.config.mts similarity index 100% rename from packages/pg/test/vitest.config.mts rename to packages/gaussdb/test/vitest.config.mts diff --git a/packages/pg/test/wrangler.jsonc b/packages/gaussdb/test/wrangler.jsonc similarity index 100% rename from packages/pg/test/wrangler.jsonc rename to packages/gaussdb/test/wrangler.jsonc diff --git a/packages/pg-connection-string/.nyc_output/processinfo/index.json b/packages/pg-connection-string/.nyc_output/processinfo/index.json deleted file mode 100644 index db6903876..000000000 --- a/packages/pg-connection-string/.nyc_output/processinfo/index.json +++ /dev/null @@ -1 +0,0 @@ -{"processes":{"417f2d4c-eaf2-4112-952c-a801df7fb93d":{"parent":null,"children":[]}},"files":{"/Users/bmc/src/node-postgres/packages/pg-connection-string/index.js":["417f2d4c-eaf2-4112-952c-a801df7fb93d"]},"externalIds":{}} \ No newline at end of file diff --git a/packages/pg-esm-test/package.json b/packages/pg-esm-test/package.json deleted file mode 100644 index 9c068b062..000000000 --- a/packages/pg-esm-test/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "pg-esm-test", - "version": "1.2.0", - "description": "A test module for PostgreSQL with ESM support", - "main": "index.js", - "type": "module", - "scripts": { - "test": "node --test" - }, - "keywords": [ - "postgres", - "postgresql", - "esm", - "test" - ], - "devDependencies": { - "pg": "^8.16.0", - "pg-cloudflare": "^1.2.5", - "pg-cursor": "^2.15.0", - "pg-native": "^3.5.0", - "pg-pool": "^3.10.0", - "pg-protocol": "^1.10.0", - "pg-query-stream": "^4.10.0" - }, - "author": "Brian M. Carlson ", - "license": "MIT" -} diff --git a/packages/pg-native/bench/index.js b/packages/pg-native/bench/index.js index 6f6641ccc..e035c6c05 100644 --- a/packages/pg-native/bench/index.js +++ b/packages/pg-native/bench/index.js @@ -1,4 +1,4 @@ -const pg = require('pg').native +const pg = require('gaussdb').native const Native = require('../') const warmup = function (fn, cb) { diff --git a/packages/pg-native/package.json b/packages/pg-native/package.json index 8c2c3e8d7..3dc72b300 100644 --- a/packages/pg-native/package.json +++ b/packages/pg-native/package.json @@ -1,7 +1,7 @@ { "name": "pg-native", "version": "3.5.0", - "description": "A slightly nicer interface to Postgres over node-libpq", + "description": "A slightly nicer interface to GaussDB over node-libpq", "main": "index.js", "exports": { ".": { @@ -20,19 +20,18 @@ }, "repository": { "type": "git", - "url": "https://github.com/brianc/node-postgres.git" + "url": "git@github.com:HuaweiCloudDeveloper/gaussdb-node.git" }, "keywords": [ - "postgres", - "pg", + "gaussdb", "libpq" ], "author": "Brian M. Carlson", "license": "MIT", "bugs": { - "url": "https://github.com/brianc/node-postgres/issues" + "url": "https://github.com/HuaweiCloudDeveloper/gaussdb-node/issues" }, - "homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-native", + "homepage": "https://github.com/HuaweiCloudDeveloper/gaussdb-node/tree/master/packages/pg-native", "dependencies": { "libpq": "^1.8.15", "pg-types": "2.2.0" diff --git a/packages/pg-protocol/README.md b/packages/pg-protocol/README.md deleted file mode 100644 index 8c52e40ec..000000000 --- a/packages/pg-protocol/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# pg-protocol - -Low level postgres wire protocol parser and serializer written in Typescript. Used by node-postgres. Needs more documentation. :smile: diff --git a/tsconfig.json b/tsconfig.json index 2730aa9a8..8fc193dc1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,8 @@ }, "include": [], "references": [ - {"path": "./packages/pg-cloudflare"}, - {"path": "./packages/pg-query-stream"}, - {"path": "./packages/pg-protocol"} + {"path": "./packages/gaussdb-cloudflare"}, + {"path": "./packages/gaussdb-query-stream"}, + {"path": "./packages/gaussdb-protocol"} ] }