postgresql-client
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -11,1 +11,2 @@ "use strict"; | ||
exports.BindParam = BindParam; | ||
//# sourceMappingURL=BindParam.js.map |
@@ -97,1 +97,2 @@ "use strict"; | ||
exports.wrapRowDescription = wrapRowDescription; | ||
//# sourceMappingURL=common.js.map |
@@ -181,1 +181,2 @@ "use strict"; | ||
exports.Connection = Connection; | ||
//# sourceMappingURL=Connection.js.map |
@@ -81,1 +81,2 @@ "use strict"; | ||
exports.Cursor = Cursor; | ||
//# sourceMappingURL=Cursor.js.map |
@@ -25,1 +25,2 @@ "use strict"; | ||
exports.ArrayBoolType = Object.assign(Object.assign({}, exports.BoolType), { name: '_bool', oid: definitions_1.DataTypeOIDs._bool, elementsOID: definitions_1.DataTypeOIDs.bool }); | ||
//# sourceMappingURL=BoolType.js.map |
@@ -48,1 +48,2 @@ "use strict"; | ||
exports.ArrayBoxType = Object.assign(Object.assign({}, exports.BoxType), { name: '_box', oid: definitions_1.DataTypeOIDs._box, elementsOID: definitions_1.DataTypeOIDs.box }); | ||
//# sourceMappingURL=BoxType.js.map |
@@ -25,1 +25,2 @@ "use strict"; | ||
exports.ArrayByteaType = Object.assign(Object.assign({}, exports.ByteaType), { name: '_bytea', oid: definitions_1.DataTypeOIDs._bytea, elementsOID: definitions_1.DataTypeOIDs.bytea }); | ||
//# sourceMappingURL=ByteaType.js.map |
@@ -23,1 +23,2 @@ "use strict"; | ||
exports.ArrayCharType = Object.assign(Object.assign({}, exports.CharType), { name: '_char', oid: definitions_1.DataTypeOIDs._char, elementsOID: definitions_1.DataTypeOIDs.char }); | ||
//# sourceMappingURL=CharType.js.map |
@@ -44,1 +44,2 @@ "use strict"; | ||
exports.ArrayCircleType = Object.assign(Object.assign({}, exports.CircleType), { name: '_circle', oid: definitions_1.DataTypeOIDs._circle, elementsOID: definitions_1.DataTypeOIDs.circle }); | ||
//# sourceMappingURL=CircleType.js.map |
@@ -53,1 +53,2 @@ "use strict"; | ||
exports.ArrayDateType = Object.assign(Object.assign({}, exports.DateType), { name: '_date', oid: definitions_1.DataTypeOIDs._date, elementsOID: definitions_1.DataTypeOIDs.date }); | ||
//# sourceMappingURL=DateType.js.map |
@@ -21,1 +21,2 @@ "use strict"; | ||
exports.ArrayFloat4Type = Object.assign(Object.assign({}, exports.Float4Type), { name: '_float4', oid: definitions_1.DataTypeOIDs._float4, elementsOID: definitions_1.DataTypeOIDs.float4 }); | ||
//# sourceMappingURL=Float4Type.js.map |
@@ -21,1 +21,2 @@ "use strict"; | ||
exports.ArrayFloat8Type = Object.assign(Object.assign({}, exports.Float8Type), { name: '_float8', oid: definitions_1.DataTypeOIDs._float8, elementsOID: definitions_1.DataTypeOIDs.float8 }); | ||
//# sourceMappingURL=Float8Type.js.map |
@@ -24,1 +24,2 @@ "use strict"; | ||
exports.ArrayInt2Type = Object.assign(Object.assign({}, exports.Int2Type), { name: '_int2', oid: definitions_1.DataTypeOIDs._int2, elementsOID: definitions_1.DataTypeOIDs.int2 }); | ||
//# sourceMappingURL=Int2Type.js.map |
@@ -24,1 +24,2 @@ "use strict"; | ||
exports.ArrayInt4Type = Object.assign(Object.assign({}, exports.Int4Type), { name: '_int4', oid: definitions_1.DataTypeOIDs._int4, elementsOID: definitions_1.DataTypeOIDs.int4 }); | ||
//# sourceMappingURL=Int4Type.js.map |
@@ -26,1 +26,2 @@ "use strict"; | ||
exports.ArrayInt8Type = Object.assign(Object.assign({}, exports.Int8Type), { name: '_int8', oid: definitions_1.DataTypeOIDs._int8, elementsOID: definitions_1.DataTypeOIDs.int8 }); | ||
//# sourceMappingURL=Int8Type.js.map |
@@ -27,1 +27,2 @@ "use strict"; | ||
exports.ArrayJsonType = Object.assign(Object.assign({}, exports.JsonType), { name: '_json', oid: definitions_1.DataTypeOIDs._json, elementsOID: definitions_1.DataTypeOIDs.json }); | ||
//# sourceMappingURL=JsonType.js.map |
@@ -48,1 +48,2 @@ "use strict"; | ||
exports.ArrayLsegType = Object.assign(Object.assign({}, exports.LsegType), { name: '_lseg', oid: definitions_1.DataTypeOIDs._lseg, elementsOID: definitions_1.DataTypeOIDs.lseg }); | ||
//# sourceMappingURL=LsegType.js.map |
@@ -24,1 +24,2 @@ "use strict"; | ||
exports.ArrayOidType = Object.assign(Object.assign({}, exports.OidType), { name: '_oid', oid: definitions_1.DataTypeOIDs._oid, elementsOID: definitions_1.DataTypeOIDs.oid }); | ||
//# sourceMappingURL=OidType.js.map |
@@ -37,1 +37,2 @@ "use strict"; | ||
exports.ArrayPointType = Object.assign(Object.assign({}, exports.PointType), { name: '_point', oid: definitions_1.DataTypeOIDs._point, elementsOID: definitions_1.DataTypeOIDs.point }); | ||
//# sourceMappingURL=PointType.js.map |
@@ -60,1 +60,2 @@ "use strict"; | ||
exports.ArrayTimestampType = Object.assign(Object.assign({}, exports.TimestampType), { name: '_timestamp', oid: definitions_1.DataTypeOIDs._timestamp, elementsOID: definitions_1.DataTypeOIDs.timestamp }); | ||
//# sourceMappingURL=TimestampType.js.map |
@@ -58,1 +58,2 @@ "use strict"; | ||
exports.ArrayTimestamptzType = Object.assign(Object.assign({}, exports.TimestamptzType), { name: '_timestamptz', oid: definitions_1.DataTypeOIDs._timestamptz, elementsOID: definitions_1.DataTypeOIDs.timestamptz }); | ||
//# sourceMappingURL=TimestamptzType.js.map |
@@ -23,1 +23,2 @@ "use strict"; | ||
exports.ArrayVarcharType = Object.assign(Object.assign({}, exports.VarcharType), { name: '_varchar', oid: definitions_1.DataTypeOIDs._varchar, elementsOID: definitions_1.DataTypeOIDs.varchar }); | ||
//# sourceMappingURL=VarcharType.js.map |
@@ -70,1 +70,2 @@ "use strict"; | ||
exports.GlobalTypeMap.register(Object.assign(Object.assign({}, VarcharType_1.ArrayVarcharType), { name: '_xml', oid: definitions_1.DataTypeOIDs._xml, elementsOID: definitions_1.DataTypeOIDs.xml })); | ||
//# sourceMappingURL=DataTypeMap.js.map |
@@ -6,3 +6,3 @@ /// <reference types="node" /> | ||
import { Protocol } from './protocol/protocol'; | ||
import type { PoolOptions } from 'lightning-pool'; | ||
import type { PoolConfiguration as LPoolConfiguration } from 'lightning-pool'; | ||
import { DataTypeMap } from './DataTypeMap'; | ||
@@ -34,3 +34,3 @@ import { BindParam } from './BindParam'; | ||
export declare type ConnectionConfiguration = DatabaseConnectionParams & SocketOptions; | ||
export interface PoolConfiguration extends ConnectionConfiguration, PoolOptions { | ||
export interface PoolConfiguration extends ConnectionConfiguration, LPoolConfiguration { | ||
} | ||
@@ -37,0 +37,0 @@ export declare enum ConnectionState { |
@@ -246,1 +246,2 @@ "use strict"; | ||
}; | ||
//# sourceMappingURL=definitions.js.map |
@@ -26,1 +26,2 @@ "use strict"; | ||
__exportStar(require("./util/parse-datetime"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -177,1 +177,2 @@ "use strict"; | ||
exports.IntlConnection = IntlConnection; | ||
//# sourceMappingURL=IntlConnection.js.map |
@@ -52,3 +52,3 @@ "use strict"; | ||
}; | ||
this._pool = lightning_pool_1.createPool(poolFactory, poolOptions); | ||
this._pool = new lightning_pool_1.Pool(poolFactory, poolOptions); | ||
this._pool.on('return', (...args) => this.emit('release', ...args)); | ||
@@ -89,19 +89,4 @@ this._pool.on('error', (...args) => this.emit('error', ...args)); | ||
async close(terminateWait) { | ||
if (this._pool.state === lightning_pool_1.PoolState.CLOSED) | ||
return; | ||
this._pool.close(false, () => 0); | ||
return new Promise(resolve => { | ||
const ms = terminateWait == null ? 10000 : terminateWait; | ||
if (ms > 0) { | ||
const startTime = Date.now(); | ||
const timer = setInterval(() => { | ||
if (this._pool.acquired === 0 || Date.now() > startTime + ms) { | ||
clearInterval(timer); | ||
this._pool.close(true, resolve); | ||
} | ||
}, 50); | ||
return; | ||
} | ||
this._pool.close(true, resolve); | ||
}); | ||
const ms = terminateWait == null ? 10000 : terminateWait; | ||
return this._pool.close(ms); | ||
} | ||
@@ -146,1 +131,2 @@ /** | ||
exports.Pool = Pool; | ||
//# sourceMappingURL=Pool.js.map |
@@ -150,1 +150,2 @@ "use strict"; | ||
exports.Portal = Portal; | ||
//# sourceMappingURL=Portal.js.map |
@@ -174,1 +174,2 @@ "use strict"; | ||
exports.PreparedStatement = PreparedStatement; | ||
//# sourceMappingURL=PreparedStatement.js.map |
@@ -249,1 +249,2 @@ "use strict"; | ||
} | ||
//# sourceMappingURL=Backend.js.map |
@@ -79,1 +79,2 @@ "use strict"; | ||
exports.BufferReader = BufferReader; | ||
//# sourceMappingURL=BufferReader.js.map |
@@ -11,1 +11,2 @@ "use strict"; | ||
exports.DatabaseError = DatabaseError; | ||
//# sourceMappingURL=DatabaseError.js.map |
@@ -211,1 +211,2 @@ "use strict"; | ||
} | ||
//# sourceMappingURL=Frontend.js.map |
@@ -328,1 +328,2 @@ "use strict"; | ||
exports.PgSocket = PgSocket; | ||
//# sourceMappingURL=PgSocket.js.map |
@@ -72,1 +72,2 @@ "use strict"; | ||
})(Protocol = exports.Protocol || (exports.Protocol = {})); | ||
//# sourceMappingURL=protocol.js.map |
@@ -108,1 +108,2 @@ "use strict"; | ||
})(SASL = exports.SASL || (exports.SASL = {})); | ||
//# sourceMappingURL=sasl.js.map |
@@ -172,1 +172,2 @@ "use strict"; | ||
SmartBuffer.DEFAULT_PAGE_SIZE = 4096; | ||
//# sourceMappingURL=SmartBuffer.js.map |
@@ -18,1 +18,2 @@ "use strict"; | ||
exports.SafeEventEmitter = SafeEventEmitter; | ||
//# sourceMappingURL=SafeEventEmitter.js.map |
@@ -20,1 +20,2 @@ "use strict"; | ||
exports.arrayCalculateDim = arrayCalculateDim; | ||
//# sourceMappingURL=array-calculatedim.js.map |
@@ -49,1 +49,2 @@ "use strict"; | ||
} | ||
//# sourceMappingURL=bigint-methods.js.map |
@@ -27,1 +27,2 @@ "use strict"; | ||
exports.configFromEnv = configFromEnv; | ||
//# sourceMappingURL=config-from-env.js.map |
@@ -67,1 +67,2 @@ "use strict"; | ||
exports.parseConnectionString = parseConnectionString; | ||
//# sourceMappingURL=connection-config.js.map |
@@ -38,1 +38,2 @@ "use strict"; | ||
exports.decodeBinaryArray = decodeBinaryArray; | ||
//# sourceMappingURL=decode-binaryarray.js.map |
@@ -45,1 +45,2 @@ "use strict"; | ||
exports.encodeBinaryArray = encodeBinaryArray; | ||
//# sourceMappingURL=encode-binaryarray.js.map |
@@ -28,1 +28,2 @@ "use strict"; | ||
exports.escapeLiteral = escapeLiteral; | ||
//# sourceMappingURL=escape-literal.js.map |
@@ -33,1 +33,2 @@ "use strict"; | ||
exports.fastParseInt = fastParseInt; | ||
//# sourceMappingURL=fast-parseint.js.map |
@@ -62,1 +62,2 @@ "use strict"; | ||
exports.parsePostgresArray = parsePostgresArray; | ||
//# sourceMappingURL=parse-array.js.map |
@@ -35,1 +35,2 @@ "use strict"; | ||
exports.parseDateTime = parseDateTime; | ||
//# sourceMappingURL=parse-datetime.js.map |
@@ -39,1 +39,2 @@ "use strict"; | ||
} | ||
//# sourceMappingURL=stringify-arrayliteral.js.map |
@@ -28,1 +28,2 @@ "use strict"; | ||
exports.stringifyValueForSQL = stringifyValueForSQL; | ||
//# sourceMappingURL=stringify-for-sql.js.map |
{ | ||
"name": "postgresql-client", | ||
"description": "Professional PostgreSQL client for JavaScript and TypeScript", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"author": "Panates", | ||
@@ -27,4 +27,4 @@ "contributors": [ | ||
"dependencies": { | ||
"doublylinked": "^2.4.0", | ||
"lightning-pool": "^2.3.0", | ||
"doublylinked": "^2.4.3", | ||
"lightning-pool": "^3.0.0", | ||
"postgres-bytea": "^3.0.0", | ||
@@ -36,5 +36,5 @@ "putil-taskqueue": "^2.5.1", | ||
"@types/mocha": "^8.0.4", | ||
"@types/node": "^14.14.7", | ||
"@typescript-eslint/eslint-plugin": "^4.7.0", | ||
"@typescript-eslint/parser": "^4.7.0", | ||
"@types/node": "^14.14.8", | ||
"@typescript-eslint/eslint-plugin": "^4.8.1", | ||
"@typescript-eslint/parser": "^4.8.1", | ||
"babel-eslint": "^10.1.0", | ||
@@ -41,0 +41,0 @@ "dotenv": "^8.2.0", |
@@ -52,14 +52,13 @@ ## postgresql-client | ||
- Supports both single connection and pooling | ||
- Supports named Prepared Statements | ||
- Named Prepared Statements | ||
- Extended cursor support with fast double-link cache | ||
- Extensible data-types and type mapping | ||
- Extended bind parameter support | ||
- Fast array support with binary encoding/decoding | ||
- Extended bind parameters | ||
- Multidimensional arrays with fast binary encoding/decoding | ||
- Low memory utilization and boosted performance with Shared Buffers | ||
- Full binary wire protocol support for all data types | ||
- Already supports text wire protocol | ||
- Built-in ScriptExecutor which allows executing multiple scripts at once | ||
- Full binary and text wire protocol support for all data types | ||
- Supports Clear text, MD5 and SASL password algorithms | ||
- Can return both array and object rows | ||
- Asynchronous Promise based api | ||
- Strictly typed | ||
- Can return both array and object rows | ||
@@ -69,2 +68,3 @@ | ||
- Support multiple active cursors | ||
- Extended field info in query result | ||
@@ -71,0 +71,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
303665
4663
+ Addedlightning-pool@3.1.4(transitive)
- Removederrorex@2.3.2(transitive)
- Removedlightning-pool@2.4.0(transitive)
- Removedputil-merge@3.13.0(transitive)
- Removedstackframe@1.3.4(transitive)
Updateddoublylinked@^2.4.3
Updatedlightning-pool@^3.0.0