Skip to content

Commit be03212

Browse files
committed
Update lint, fix for pg@7.x
1 parent 4164686 commit be03212

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function Cursor(text, values, config) {
1515
this.connection = null
1616
this._queue = []
1717
this.state = 'initialized'
18-
this._result = new Result(this._conf.rowMode)
18+
this._result = new Result(this._conf.rowMode, this._conf.types)
1919
this._cb = null
2020
this._rows = null
2121
this._portal = null
@@ -155,7 +155,6 @@ Cursor.prototype._getRows = function(rows, cb) {
155155
}
156156

157157
Cursor.prototype.end = function(cb) {
158-
console.log(this.state)
159158
if (this.state !== 'initialized') {
160159
this.connection.sync()
161160
}
@@ -178,7 +177,6 @@ Cursor.prototype.close = function(cb) {
178177
}
179178

180179
Cursor.prototype.read = function(rows, cb) {
181-
console.log('state', this.state)
182180
if (this.state === 'idle') {
183181
return this._getRows(rows, cb)
184182
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pg-cursor",
33
"version": "2.0.0",
4-
"description": "",
4+
"description": "Query cursor extension for node-postgres",
55
"main": "index.js",
66
"directories": {
77
"test": "test"
@@ -20,7 +20,7 @@
2020
"eslint-config-prettier": "^6.4.0",
2121
"eslint-plugin-prettier": "^3.1.1",
2222
"mocha": "^6.2.2",
23-
"pg": "^7.12.1",
23+
"pg": "7.x",
2424
"prettier": "^1.18.2"
2525
},
2626
"prettier": {

test/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ describe('cursor', function() {
2727
})
2828
})
2929

30-
it.only('end before reading to end', function(done) {
30+
it('end before reading to end', function(done) {
3131
const cursor = this.pgCursor(text)
3232
cursor.read(3, function(err, res) {
3333
assert.ifError(err)
3434
assert.equal(res.length, 3)
35-
cursor.end(done)
35+
done()
3636
})
3737
})
3838

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ pg-types@^2.1.0:
906906
postgres-date "~1.0.4"
907907
postgres-interval "^1.1.0"
908908

909-
pg@^7.12.1:
909+
pg@7.x:
910910
version "7.12.1"
911911
resolved "https://registry.yarnpkg.com/pg/-/pg-7.12.1.tgz#880636d46d2efbe0968e64e9fe0eeece8ef72a7e"
912912
integrity sha512-l1UuyfEvoswYfcUe6k+JaxiN+5vkOgYcVSbSuw3FvdLqDbaoa2RJo1zfJKfPsSYPFVERd4GHvX3s2PjG1asSDA==

0 commit comments

Comments
 (0)