#pervasive sql libraries
/usr/local/psql/lib/
Then issue sudo ldconfig
| /*jslint node: true, maxerr: 50, indent: 4 */ | |
| "use strict"; | |
| var clusterInstance; | |
| var SimpleCluster = module.exports = function () { | |
| //there should only be one instance of this per process | |
| if (clusterInstance) { | |
| return clusterInstance; |
| // Copyright Joyent, Inc. and other Node contributors. | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a | |
| // copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to permit | |
| // persons to whom the Software is furnished to do so, subject to the | |
| // following conditions: | |
| // |
| //Benchmark calling a function passing it an anonymous function vs passing it a named function | |
| // | |
| var iterations = 100000; | |
| function testAnon(fn) { | |
| console.time('test-anonymous-function'); | |
| for (var x = 0; x < iterations; x++) { | |
| fn(function () {}); | |
| } |
| var udp = require('dgram'); | |
| var s = udp.createSocket('udp4'); | |
| s.bind(27016, '127.0.0.1'); | |
| var t; | |
| s.on('message', function(data, remote) { | |
| var req = data.toString(); | |
| if (req == 'go-ahead') { |
| ./bin/node-mysql-bindings-benchmark.js | |
| Benchmarking CPP-MySQL: | |
| **** Benchmark initialization time is 0.00s | |
| **** 1000000 escapes in 0.17s (5882352/s) | |
| **** 1000 sync reconnects in 0.09s (11111/s) | |
| **** 10000 sync insertions in 0.16s (62500/s) | |
| Benchmarking PHP-MySQL: | |
| **** Benchmark initialization time is 0s | |
| **** 1000000 escapes in 0.66s (1508394/s) | |
| **** 1000 sync reconnects in 0.23s (4307/s) |
| /* | |
| Permission to use, copy, modify, and/or distribute this software for any | |
| purpose with or without fee is hereby granted, provided that the above | |
| copyright notice and this permission notice appear in all copies. | |
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| { | |
| 'targets' : [ | |
| { | |
| 'target_name' : 'modulename', | |
| 'sources' : [ | |
| 'modulename.cpp' | |
| ] | |
| } | |
| ] | |
| } |
| var prompt = require('prompt'); | |
| var result2 = []; | |
| //not sure what this does so don't know when it should be called. | |
| prompt.start(); | |
| function getData() { | |
| prompt.get(['username', 'email'], function (err, result) { | |
| if (err) { return onErr(err); } | |
| console.log('Command-line input received:'); |
| make: Entering directory `/home/dverweire/projects/node/node-odbc/build' | |
| CXX(target) Release/obj.target/odbc_bindings/src/odbc.o | |
| ../src/odbc.cpp: In static member function ‘static void ODBC::Init(v8::Handle<v8::Object>)’: | |
| ../src/odbc.cpp:65:16: warning: unused variable ‘isolate’ [-Wunused-variable] | |
| v8::Isolate* isolate = v8::Isolate::GetCurrent(); | |
| ../node_modules/nan/nan_new.h: In instantiation of ‘typename NanIntern::Factory<T>::return_t NanNew(A0) [with T = v8::Integer; A0 = long int; typename NanIntern::Factory<T>::return_t = v8::Local<v8::Integer>]’: | |
| ../src/odbc.cpp:386:18: required from here | |
| ../node_modules/nan/nan_new.h:209:41: error: call of overloaded ‘New(long int&)’ is ambiguous | |
| return NanIntern::Factory<T>::New(arg0); | |
| ^ |