From 13c44ed6e68edb312bb236271f0ed49f5c4efeb8 Mon Sep 17 00:00:00 2001 From: brianc Date: Thu, 28 Oct 2010 17:41:05 -0700 Subject: [PATCH] --- Query.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Query.md b/Query.md index e7d03fd..b76f36a 100644 --- a/Query.md +++ b/Query.md @@ -1 +1,24 @@ -need to document \ No newline at end of file +need to document + +#### Prepared statements + +I'm still working on the API for prepared statements. Check out the +tests for more up to date examples, but what I'm working towards is +something like this: + + + var client = new Client({ + user: 'brian', + database: 'test' + }); + + var query = client.query({ + text: 'select * from person where age < $1', + values: [21] + }); + + query.on('row', function(row) { + console.log(row); + }); + + query.on('end', function() { client.end() }); \ No newline at end of file