diff --git a/lib/native/index.js b/lib/native/index.js index f0bbbef0..fd405f29 100644 --- a/lib/native/index.js +++ b/lib/native/index.js @@ -193,12 +193,12 @@ var clientBuilder = function(config) { connection._pulseQueryQueue(); } }); - connection.on('_copyInResponse', function () { + connection.on('copyInResponse', function () { //connection is ready to accept chunks //start to send data from stream connection._activeQuery.streamData(connection); }); - connection.on('_copyData', function (chunk) { + connection.on('copyData', function (chunk) { //recieve chunk from connection //move it to stream connection._activeQuery.handleCopyFromChunk(chunk); diff --git a/src/binding.cc b/src/binding.cc index a9a4648f..982aa969 100644 --- a/src/binding.cc +++ b/src/binding.cc @@ -439,7 +439,7 @@ protected: while ((result = PQgetResult(connection_))) { if (PGRES_COPY_IN == PQresultStatus(result)) { didHandleResult = false; - Emit("_copyInResponse"); + Emit("copyInResponse"); PQclear(result); break; } else if (PGRES_COPY_OUT == PQresultStatus(result)) { @@ -483,7 +483,7 @@ protected: if (copied > 0) { Buffer * chunk = Buffer::New(buffer, copied); Handle node_chunk = chunk->handle_; - Emit("_copyData", &node_chunk); + Emit("copyData", &node_chunk); PQfreemem(buffer); //result was not handled copmpletely return false;