mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-25 16:03:13 +00:00
start working on parsing
This commit is contained in:
parent
bfec84bc15
commit
380abbf6a6
@ -109,6 +109,10 @@ p.query = function(text) {
|
||||
return this;
|
||||
};
|
||||
|
||||
p.parse = function(text, types) {
|
||||
|
||||
};
|
||||
|
||||
p.pulseQueryQueue = function(ready) {
|
||||
if(!this.readyForQuery) {
|
||||
return;
|
||||
|
||||
@ -1 +1,28 @@
|
||||
require(__dirname+"/test-helper");
|
||||
//http://developer.postgresql.org/pgdocs/postgres/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
|
||||
var client = createClient();
|
||||
client.stream.emit('data', buffers.readyForQuery());
|
||||
//client sends parse message
|
||||
|
||||
test('prepared queries', function() {
|
||||
|
||||
test("parse messages", function() {
|
||||
|
||||
test('parsing a query with no parameters', function() {
|
||||
client.parse('!');
|
||||
assert.length(client.stream.packets, 1);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//server raises parse complete message
|
||||
|
||||
test('sends bind message', function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
test('recieves rows', function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@ -77,6 +77,8 @@ buffers.error = function(fields) {
|
||||
return buf.join(true, 'E');
|
||||
};
|
||||
|
||||
|
||||
buffers.parseComplete = function() {
|
||||
return new BufferList().join(true, '1');
|
||||
};
|
||||
|
||||
module.exports = buffers;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user