@sqb/postgres
Advanced tools
Comparing version 4.0.1-beta.14 to 4.0.1-beta.15
@@ -10,2 +10,3 @@ "use strict"; | ||
const postgresql_client_1 = require("postgresql-client"); | ||
const datatype_map_1 = require("./datatype-map"); | ||
const SqbDataTypToOIDMap = { | ||
@@ -80,6 +81,16 @@ [connect_1.DataType.BOOL]: postgresql_client_1.DataTypeOIDs.bool, | ||
async execute(query) { | ||
var _a; | ||
assert_1.default.ok(this.intlcon, 'Can not execute query with a closed db session'); | ||
const params = (_a = query.params) === null || _a === void 0 ? void 0 : _a.map((v, i) => { | ||
const paramOpts = Array.isArray(query.paramOptions) ? query.paramOptions[i] : undefined; | ||
if (v != null && paramOpts && paramOpts.dataType) { | ||
const oid = datatype_map_1.dataTypeToOID(paramOpts.dataType, paramOpts.isArray); | ||
if (oid) | ||
return new postgresql_client_1.BindParam(oid, v); | ||
} | ||
return v; | ||
}); | ||
const opts = { | ||
autoCommit: query.autoCommit, | ||
params: query.params, | ||
params, | ||
cursor: query.cursor, | ||
@@ -86,0 +97,0 @@ fetchCount: query.fetchRows, |
{ | ||
"name": "@sqb/postgres", | ||
"description": "SQB serialization extension for PostgreSQL database", | ||
"version": "4.0.1-beta.14", | ||
"version": "4.0.1-beta.15", | ||
"author": "Panates Ltd.", | ||
@@ -34,3 +34,3 @@ "contributors": [ | ||
"postgresql-client": "^1.13.0", | ||
"@sqb/postgres-dialect": "^4.0.1-beta.14" | ||
"@sqb/postgres-dialect": "^4.0.1-beta.15" | ||
}, | ||
@@ -37,0 +37,0 @@ "main": "dist/index.js", |
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
12944
10
254