This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var binding = require("./build/default/binding"); | |
var Connection = binding.Connection; | |
// postgres cannot handle multiple queries at the same time. | |
// thus we must queue them internally and dispatch them as | |
// others come in. | |
Connection.prototype.maybeDispatchQuery = function () { | |
if (!this._queries) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/postgres.js b/postgres.js | |
index 273c9e8..92286c3 100644 | |
--- a/postgres.js | |
+++ b/postgres.js | |
@@ -17,7 +17,7 @@ Connection.prototype.maybeDispatchQuery = function () { | |
Connection.prototype.query = function (sql, callback) { | |
this._queries = this._queries || []; | |
- this._queries.push([sql, callback]); | |
+ this._queries.push([sql, callback, arguments]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filename = 'test.manifest' | |
var crypto = require('crypto'); | |
var util = require('util'); | |
var fs = require('fs'); | |
var shasum = crypto.createHash('sha1'); | |
var s = fs.ReadStream(filename); | |
s.on('data', function(d) { | |
shasum.update(d); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filename = 'test.manifest' | |
var crypto = require('crypto'); | |
var fs = require('fs'); | |
var shasum = crypto.createHash('sha1'); | |
var s = fs.ReadStream(filename); | |
s.on('data', function(d) { | |
shasum.update(d); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var util = require('util'); | |
var url = require('url'); | |
http.createServer(function (req, res) { | |
var parts = url.parse(req.url, true); | |
var img = parts.query.url; | |
var parsed = url.parse(img); | |
util.log(util.inspect(parsed)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Pool = require('../odbc.js').Pool; | |
var pool = new Pool(); | |
var Database = require('../odbc.js').Database; | |
var connectionString = 'DRIVER={pgdb};SERVER=192.168.x.x;UID=postgres;PWD=;DATABASE=postgres'; | |
var connections = []; | |
var connectCount = 100; | |
openConnectionsUsingPool(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pgdb] | |
Description = PostgreSQL ODBC driver | |
Driver = /usr/lib/odbc/psqlodbca.so | |
Setup = /usr/lib/odbc/libodbcpsqlS.so | |
Debug = 0 | |
CommLog = 1 | |
UsageCount = 2 |