mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
parsing noData message
This commit is contained in:
parent
65b64ff005
commit
f63659cbc5
@ -197,7 +197,8 @@ var messageNames = {
|
||||
N: 'notice',
|
||||
1: 'parseComplete',
|
||||
2: 'bindComplete',
|
||||
A: 'notification'
|
||||
A: 'notification',
|
||||
n: 'noData'
|
||||
};
|
||||
|
||||
p.parseMessage = function() {
|
||||
@ -350,6 +351,10 @@ p.parseA = function(msg) {
|
||||
return msg;
|
||||
};
|
||||
|
||||
p.parsen = function(msg) {
|
||||
return msg;
|
||||
};
|
||||
|
||||
p.readChar = function() {
|
||||
return Buffer([this.buffer[this.offset++]]).toString(this.encoding);
|
||||
};
|
||||
|
||||
@ -181,6 +181,13 @@ test('Connection', function() {
|
||||
});
|
||||
});
|
||||
|
||||
test("no data message", function() {
|
||||
testForMessage(Buffer([0x6e, 0, 0, 0, 4]), {
|
||||
id: 'n',
|
||||
name: 'noData'
|
||||
});
|
||||
});
|
||||
|
||||
test('one row message', function() {
|
||||
var message = testForMessage(oneRowDescBuff, expectedOneRowMessage);
|
||||
test('has one field', function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user