brianc / node-pg-cursor

Query cursor extension for node-postgres
78 stars 30 forks source link

Invalid JavaScript in the example #33

Open vitaly-t opened 7 years ago

vitaly-t commented 7 years ago

Not sure where/how to PR documentation updates, or whether it is possible at all.

This code below in the documentation:

cursor.read(100, function (err, rows) => {
  cursor.close(() => {
    client.release()
  })
})

is invalid JavaScript for the callback function. You cannot combine function style with => arrow style.