BTW you have error there.
var cfg = require("./config").cfg;
var fb = require('./node-firebird/lib/index.js');
var http = require('http');
var con = new fb.Database('127.0.0.1', 3050, cfg.db, cfg.user,
cfg.password,
function(){
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
con.execute("select * from rdb$relations", function(rs){
res.write('[');
rs.data.forEach(function(r){
res.write(JSON.stringify(r[3])+',');
});
res.end(']');
},function(err){ console.log(err);});
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
});
process.on('exit',function(){
con.detach();
});
produces
[0,1,2,3,4,5,6,7,8,9,10,11,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,128,2696,130,131,
3592,]
while correct one is
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
,30,31,32,33,34,35,36,37,38,39,40,41,128,2696,130,131,3592,]
I wanted to test performance but can not get same result for query.
2012/5/31 Henri Gourvest <[email protected]>
> Le 31/05/12 18:06, Denys Khanzhiyev a écrit :
>
> What is the use of empty database ?
>>
> just to fetch a smalest dataset from rdb$relations
>
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-**
> Posting-Guidelines<https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines>
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> nodejs+unsubscribe@**googlegroups.com<nodejs%[email protected]>
> For more options, visit this group at
> http://groups.google.com/**group/nodejs?hl=en?hl=en<http://groups.google.com/group/nodejs?hl=en?hl=en>
>
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en