@brainsights/postgres-wrapper
Advanced tools
Comparing version 2.1.0 to 3.0.0
{ | ||
"name": "@brainsights/postgres-wrapper", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,2 +26,17 @@ const { NumericRange } = require("./range"); | ||
let parse_NUMRANGE = (value) => | ||
{ | ||
const RANGE_REGEX = /(\[|\()("((?:\\"|[^"])*)"|[^"]*),("((?:\\"|[^"])*)"|[^"]*)(\]|\))/; | ||
let matches = value.match(RANGE_REGEX); | ||
if(!matches) { | ||
return undefined; | ||
} | ||
let lower = parseInt(matches[2]); | ||
let upper = parseInt(matches[4]); | ||
return [lower, upper]; | ||
} | ||
let parse_TIMESTAMP = (value) => | ||
@@ -40,3 +55,4 @@ { | ||
installParser(pgTypes, oids.BIGINT, parse_BIGINT); | ||
installParser(pgTypes, oids.INT8RANGE, parse_INT8RANGE); | ||
// installParser(pgTypes, oids.INT8RANGE, parse_INT8RANGE); | ||
installParser(pgTypes, oids.NUMRANGE, parse_NUMRANGE); | ||
installParser(pgTypes, oids.TIMESTAMP, parse_TIMESTAMP); | ||
@@ -43,0 +59,0 @@ installParser(pgTypes, oids.TIMESTAMPTZ, parse_TIMESTAMP); |
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
7320
283