Socket
Socket
Sign inDemoInstall

pg

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg - npm Package Compare versions

Comparing version 7.9.0 to 7.10.0

3

CHANGELOG.md

@@ -7,2 +7,5 @@ All major and minor releases are briefly explained below.

### 7.10.0
- Add support for [per-query types](https://github.com/brianc/node-postgres/pull/1825).
### 7.9.0

@@ -9,0 +12,0 @@

5

lib/client.js

@@ -481,4 +481,5 @@ 'use strict'

}
if (query._result) {
query._result._getTypeParser = this._types.getTypeParser.bind(this._types)
if (query._result && !query._result._types) {
query._result._types = this._types
}

@@ -485,0 +486,0 @@

@@ -197,3 +197,8 @@ 'use strict'

if (self.values) {
self.values = self.values.map(utils.prepareValue)
try {
self.values = self.values.map(utils.prepareValue)
} catch (err) {
this.handleError(err, connection)
return
}
}

@@ -200,0 +205,0 @@

@@ -15,3 +15,3 @@ 'use strict'

// passed as second argument to provided callback
var Result = function (rowMode) {
var Result = function (rowMode, types) {
this.command = null

@@ -23,2 +23,3 @@ this.rowCount = null

this._parsers = []
this._types = types
this.RowCtor = null

@@ -99,3 +100,3 @@ this.rowAsArray = rowMode === 'array'

this.fields.push(desc)
var parser = this._getTypeParser(desc.dataTypeID, desc.format || 'text')
var parser = (this._types || types).getTypeParser(desc.dataTypeID, desc.format || 'text')
this._parsers.push(parser)

@@ -105,4 +106,2 @@ }

Result.prototype._getTypeParser = types.getTypeParser
module.exports = Result

@@ -100,3 +100,8 @@ 'use strict'

var offset = -date.getTimezoneOffset()
var ret = pad(date.getFullYear(), 4) + '-' +
var year = date.getFullYear()
var isBCYear = year < 1
if (isBCYear) year = Math.abs(year) + 1 // negative years are 1 off their BC representation
var ret = pad(year, 4) + '-' +
pad(date.getMonth() + 1, 2) + '-' +

@@ -114,7 +119,13 @@ pad(date.getDate(), 2) + 'T' +

return ret + pad(Math.floor(offset / 60), 2) + ':' + pad(offset % 60, 2)
ret += pad(Math.floor(offset / 60), 2) + ':' + pad(offset % 60, 2)
if (isBCYear) ret += ' BC'
return ret
}
function dateToStringUTC (date) {
var ret = pad(date.getUTCFullYear(), 4) + '-' +
var year = date.getUTCFullYear()
var isBCYear = year < 1
if (isBCYear) year = Math.abs(year) + 1 // negative years are 1 off their BC representation
var ret = pad(year, 4) + '-' +
pad(date.getUTCMonth() + 1, 2) + '-' +

@@ -127,3 +138,5 @@ pad(date.getUTCDate(), 2) + 'T' +

return ret + '+00:00'
ret += '+00:00'
if (isBCYear) ret += ' BC'
return ret
}

@@ -130,0 +143,0 @@

{
"name": "pg",
"version": "7.9.0",
"version": "7.10.0",
"description": "PostgreSQL client - pure javascript & libpq with the same API",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc