Refactor message format codes handling (#45)

This commit is contained in:
jeromew
2016-07-26 21:39:48 +02:00
committed by Brian C
parent ee84aba89f
commit ae5b344395
3 changed files with 27 additions and 20 deletions

17
message-formats.js Normal file
View File

@@ -0,0 +1,17 @@
/**
* The COPY feature uses the following protocol codes.
* The codes for the most recent protocol version are documented on
* https://www.postgresql.org/docs/current/static/protocol-message-formats.html
*
* The protocol flow itself is described on
* https://www.postgresql.org/docs/current/static/protocol-flow.html
*/
module.exports = {
ErrorResponse: 0x45,
CopyInResponse: 0x47,
CopyOutResponse: 0x48,
CopyBothResponse: 0x57,
CopyData: 0x64,
CopyDone: 0x63,
CopyFail: 0x66
}