From 469f9fd2a59cd245b90e9a138e098e14f59a1429 Mon Sep 17 00:00:00 2001 From: Nicholas Wolverson Date: Sun, 13 Aug 2017 21:32:13 +0100 Subject: [PATCH 1/2] Check callback for undefined As of 7.0 pg / 2.0 pg-pool the callback is called with `undefined` rather than `null`: https://github.com/brianc/node-pg-pool/blob/master/index.js#L227 --- src/Database/PostgreSQL.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Database/PostgreSQL.js b/src/Database/PostgreSQL.js index 7c7aeff..8fb8061 100644 --- a/src/Database/PostgreSQL.js +++ b/src/Database/PostgreSQL.js @@ -13,7 +13,7 @@ exports.ffiConnect = function(pool) { return function(onSuccess) { return function() { pool.connect(function(err, client, done) { - if (err !== null) { + if (err != null) { onError(err)(); return; } @@ -35,7 +35,7 @@ exports.ffiUnsafeQuery = function(client) { values: values, rowMode: 'array', }, function(err, result) { - if (err !== null) { + if (err != null) { onError(err)(); return; } From f1f792e1200ea78aa9a7f3ce187f33c3c05448a3 Mon Sep 17 00:00:00 2001 From: rightfold Date: Wed, 6 Dec 2017 08:33:54 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3aa3741..10c95ca 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ purescript-postgresql-client is a PostgreSQL client library for PureScript. +## NOTE: I WILL NO LONGER BE MAINTAINING THIS LIBRARY. DUE TO THE COUNTLESS PROBLEMS AND PITFALLS IN THE NODE.JS POSTGRESQL LIBRARY IT IS NO MORE FUN BUT JUST A MASSIVE PITA. IF ANYBODY WANTS TO VOLUNTEER, PLEASE LET ME KNOW, AND I WILL TRANSFER OWNERSHIP OF THE REPO. I THINK THE ONLY TWO REAL SOLUTIONS WOULD BE TO EITHER WRITE A NEW LIBPQ BINDING FOR NODE OR TO WRITE A PSC BACKEND FOR A DECENT PLATFORM (NOT NODE.JS). + To use this library, you need to add `pg` as an npm dependency. You can also find this npm library on [https://github.com/brianc/node-postgres][pg].