Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both connect() and connectSync() return undefined value on 'success' on latest Node.js #47

Open
sjuvonen opened this issue Oct 2, 2016 · 0 comments

Comments

@sjuvonen
Copy link

sjuvonen commented Oct 2, 2016

I am not able to create connections using Node 6.7.0 and libpq 1.8.5. Both connect() and connectSync() have no return value when the connection is successful (on libpq's side). Passing invalid parameters to the functions will result in an error and the error object is passed to my code as it should, but otherwise there is no value passed.

let Libpq = require("libpq");
let pq = new Libpq;

pq.connect("postgresql://localhost/mydb", (...args) => {
  console.log(args.length); // outputs '0'
});

let client = pq.connectSync("postgresql://localhost/mydb");
console.log(client); // outputs 'undefined'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant