Git Product home page Git Product logo

node-mariasql's Introduction

Description

A node.js binding to MariaDB's non-blocking (MySQL-compatible) client library.

This binding is different from a vanilla libmysqlclient binding in that it uses the non-blocking functions available in MariaDB's client library. As a result, this binding does not use multiple threads to achieve non-blocking behavior.

Benchmarks comparing this module to the other node.js MySQL driver modules can be found here.

Build Status Build status

Upgrading from v0.1.x? See a list of (breaking) changes here.

Requirements

Install

npm install mariasql

Examples

  • Simple query:
var Client = require('mariasql');

var c = new Client({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar'
});

c.query('SHOW DATABASES', function(err, rows) {
  if (err)
    throw err;
  console.dir(rows);
});

c.end();
  • Get column metadata:
var Client = require('mariasql');

var c = new Client({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar'
});

c.query('SHOW DATABASES', null, { metadata: true }, function(err, rows) {
  if (err)
    throw err;
  // `rows.info.metadata` contains the metadata
  console.dir(rows);
});

c.end();
  • Use arrays (faster) instead of objects for rows:
var Client = require('mariasql');

var c = new Client({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar'
});

c.query('SHOW DATABASES', null, { useArray: true }, function(err, rows) {
  if (err)
    throw err;
  console.dir(rows);
});

c.end();
  • Use placeholders in a query
var Client = require('mariasql');

var c = new Client({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar',
  db: 'mydb'
});

c.query('SELECT * FROM users WHERE id = :id AND name = :name',
        { id: 1337, name: 'Frylock' },
        function(err, rows) {
  if (err)
    throw err;
  console.dir(rows);
});

c.query('SELECT * FROM users WHERE id = ? AND name = ?',
        [ 1337, 'Frylock' ],
        function(err, rows) {
  if (err)
    throw err;
  console.dir(rows);
});

c.end();
  • Stream rows
var Client = require('mariasql');

var c = new Client({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar',
  db: 'mydb'
});

var query = c.query("SELECT * FROM users WHERE id > 1");
query.on('result', function(res) {
  // `res` is a streams2+ Readable object stream
  res.on('data', function(row) {
    console.dir(row);
  }).on('end', function() {
    console.log('Result set finished');
  });
}).on('end', function() {
  console.log('No more result sets!');
});

c.end();
  • Explicitly generate a prepared query for later use
var Client = require('mariasql');

var c = new Client({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar',
  db: 'mydb'
});

var prep = c.prepare('SELECT * FROM users WHERE id = :id AND name = :name');

c.query(prep({ id: 1337, name: 'Frylock' }), function(err, rows) {
  if (err)
    throw err;
  console.dir(rows);
});

c.end();

API

require('mariasql') returns a Client object

Client properties

  • connected - boolean - true if the Client instance is currently connected to the server.

  • connecting - boolean - true if the Client instance is currently in the middle of connecting to the server.

  • threadId - string - If connected, this is the thread id of this connection on the server.

Client events

  • ready() - Connection and authentication with the server was successful.

  • error(< Error >err) - An error occurred at the connection level.

  • end() - The connection ended gracefully.

  • close() - The connection has closed.

Client methods

  • (constructor)() - Creates and returns a new Client instance.

  • connect(< object >config) - (void) - Attempts a connection to a server using the information given in config:

    • user - string - Username for authentication. Default: (*nix: current login name, Windows: ???)

    • password - string - Password for authentication. Default: (blank password)

    • host - string - Hostname or IP address of the MySQL/MariaDB server. Default: "localhost"

    • port - integer - Port number of the MySQL/MariaDB server. Default: 3306

    • unixSocket - string - Path to a unix socket to connect to (host and port are ignored). Default: (none)

    • protocol - string - Explicit connection method. Can be one of: 'tcp', 'socket', 'pipe', 'memory'. Any other value uses the default behavior. Default: 'tcp' if host or port are specified, 'socket' if unixSocket is specified, otherwise default behavior is used.

    • db - string - A database to automatically select after authentication. Default: (no db)

    • keepQueries - boolean - Keep enqueued queries that haven't started executing, after the connection closes? (Only relevant if reusing Client instance) Default: false

    • multiStatements - boolean - Allow multiple statements to be executed in a single "query" (e.g. connection.query('SELECT 1; SELECT 2; SELECT 3')) on this connection. Default: false

    • connTimeout - integer - Number of seconds to wait for a connection to be made. Default: 10

    • pingInterval - integer - Number of seconds between pings while idle. Default: 60

    • secureAuth - boolean - Use password hashing available in MySQL 4.1.1+ when authenticating. Default: true

    • compress - boolean - Use connection compression? Default: false

    • ssl - mixed - If boolean true, defaults listed below and default ciphers will be used, otherwise it must be an object with any of the following valid properties: Default: false

      • key - string - Path to a client private key file in PEM format (if the key requires a passphrase and libmysqlclient was built with yaSSL (bundled Windows libraries are), an error will occur). Default: (none)

      • cert - string - Path to a client certificate key file in PEM format. Default: (none)

      • ca - string - Path to a file in PEM format that contains a list of trusted certificate authorities. Default: (none)

      • capath - string - Path to a directory containing certificate authority certificate files in PEM format. Default: (none)

      • cipher - string - A colon-delimited list of ciphers to use when connecting. Default: "ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH" (if cipher is set to anything other than false or non-empty string)

      • rejectUnauthorized - boolean - If true, the connection will be rejected if the Common Name value does not match that of the host name. Default: false

    • local_infile - boolean - If true, will set "local-infile" for the client. Default: (none)

      NOTE: the server needs to have its own local-infile = 1 under the [mysql] and/or [mysqld] sections of my.cnf

    • read_default_file - string - Provide a path to the my.cnf configuration file to be used by the client. Sets MYSQL_READ_DEFAULT_FILE option in the C client. Default: (none)

      FROM MAN PAGE: These options can be used to read a config file like /etc/my.cnf or ~/.my.cnf. By default MySQL's C client library doesn't use any config files unlike the client programs (mysql, mysqladmin, ...) that do, but outside of the C client library. Thus you need to explicitly request reading a config file...

    • read_default_group - string - Provide the name of the group to be read in the my.cnf configuration file without the square brackets e.g. "client" for section [client] in my.cnf. If not set but "read_default_file" is set, the client tries to read from these groups: [client] or [client-server] or [client-mariadb]. Sets MYSQL_READ_DEFAULT_GROUP option in the C client. Default: (none)

    • charset - string - The connection's charset.

    • streamHWM - integer - A global highWaterMark to use for all result set streams for this connection. This value can also be supplied/overriden on a per-query basis.

  • query(< string >query[, < mixed >values[, < object >options]][, < function >callback]) - mixed - Enqueues the given query and returns a Results object. values can be an object or array containing values to be used when replacing placeholders in query (see prepare()). If supplying options without values, you must pass null for values. If callback is supplied, all rows are buffered in memory and callback receives (err, rows) (rows also contains an info object containing information about the result set, including metadata if requested). Valid options:

    • useArray - boolean - When true, arrays are used to store row values instead of an object keyed on column names. (Note: using arrays performs much faster)

    • metadata - boolean - When true, column metadata is also retrieved and available for each result set.

    • hwm - integer - This is the highWaterMark of result set streams. If you supply a callback, this option has no effect.

  • prepare(< string >query) - function - Generates a re-usable function for query when it contains placeholders (can be simple ? position-based or named :foo_bar1 placeholders or any combination of the two). In the case that the function does contain placeholders, the generated function is cached per-connection if it is not already in the cache (currently the cache will hold at most 30 prepared queries). The returned function takes an object or array and returns the query with the placeholders replaced by the values in the object or array. Note: Every value is converted to a (utf8) string when filling the placeholders.

  • escape(< string >value) - string - Escapes value for use in queries. This method requires a live connection.

  • isMariaDB() - boolean - Returns true if the remote server is MariaDB.

  • abort([< boolean >killConn][, < function >callback]) - (void) - If killConn === true, then the current connection is killed (via a KILL xxxx query on a separate, temporary connection). Otherwise, just the currently running query is killed (via a KILL QUERY xxxx query on a separate, temporary connection). When killing just the currently running query, this method will have no effect if the query has already finished but is merely in the process of transferring results from the server to the client.

  • lastInsertId() - string - Returns the last inserted auto-increment id. If you insert multiple rows in a single query, then this value will return the auto-increment id of the first row, not the last.

  • serverVersion() - string - Returns a string containing the server version.

  • end() - (void) - Closes the connection once all queries in the queue have been executed.

  • destroy() - (void) - Closes the connection immediately, even if there are other queries still in the queue.

Client static properties

  • Column flags (in metadata):

    • Client.NOT_NULL_FLAG: Field cannot be NULL
    • Client.PRI_KEY_FLAG: Field is part of a primary key
    • Client.UNIQUE_KEY_FLAG: Field is part of a unique key
    • Client.MULTIPLE_KEY_FLAG: Field is part of a nonunique key
    • Client.BLOB_FLAG: Field is a BLOB or TEXT (deprecated)
    • Client.UNSIGNED_FLAG: Field has the UNSIGNED attribute
    • Client.ZEROFILL_FLAG: Field has the ZEROFILL attribute
    • Client.BINARY_FLAG: Field has the BINARY attribute
    • Client.ENUM_FLAG: Field is an ENUM
    • Client.AUTO_INCREMENT_FLAG: Field has the AUTO_INCREMENT attribute
    • Client.TIMESTAMP_FLAG: Field is a TIMESTAMP (deprecated)
    • Client.SET_FLAG: Field is a SET
    • Client.NO_DEFAULT_VALUE_FLAG: Field has no default value
    • Client.ON_UPDATE_NOW_FLAG: Field is set to NOW on UPDATE
    • Client.PART_KEY_FLAG: Field is part of some key
    • Client.NUM_FLAG: Field is numeric

Client static methods

  • escape(< string >value) - string - Escapes value for use in queries. This method does not take into account character encodings.

  • version() - string - Returns a string containing the libmariadbclient version number.

Results events

  • result(< ResultSetStream >res) - res represents a single result set.

  • error(< Error >err) - An error occurred while processing this set of results (the 'end' event will not be emitted).

  • end() - All queries in this result set finished successfully.

ResultSetStream is a standard streams2+ Readable object stream. Some things to note:

  • ResultSetStream instances have an info property that contains result set-specific information, such as metadata, row count, number of affected rows, and last insert id. These values are populated and available at the end event.

node-mariasql's People

Contributors

arianitu avatar bibleforge avatar chriso avatar colmharte avatar gabesmed avatar janmeier avatar japhy- avatar kkoopa avatar leonidaz avatar mscdex avatar not-implemented avatar roamm avatar umtm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-mariasql's Issues

when selecting stored procedure instead "show databases" , "end" is called twice problem.

[ procedure]
DELIMITER //
DROP PROCEDURE IF EXISTS SP_SEL_DEPARTMENTS_01;
USE employees;
CREATE PROCEDURE SP_SEL_DEPARTMENTS_01()
BEGIN
SELECT DEPT_NO, DEPT_NAME FROM DEPARTMENTS;
END//

DELIMITER ;

[node.js file]

 c.query('call SP_SELECT_DEPT_MANAGER()')
    .on('result', function(res) {
        res.on('row', function(row) {
            self.data[self.data.length] = row ;
        })
        .on('error', function(err) {
            console.log('Result error: ' + inspect(err));
            })
        .on('end', function(info) {
            console.log('Result finished successfully');
            });
    })
    .on('end', function() {
        console.log('Done with all results');
        callback(null, self.data);
    });

[result ]
Result finished successfully
Result finished successfully
Done with all results

=> Why res.on('end', ...) is called twice? Other insert procedure or query is called once.

Installation on Ubuntu 12.04 Fails

../src/binding.cc:328:51: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:330:41: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:351:39: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:355:41: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:369:37: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:373:39: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:383:39: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:443:37: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:445:36: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:459:39: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:477:37: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:493:35: error: within this context
../src/binding.cc:588:10: error: initialising argument 1 of ‘void Client::emit(v8::Persistentv8::String)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:500:37: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:505:40: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h: In static member function ‘static void Client::cb_poll(uv_poll_t_, int, int)’:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:566:63: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:751:3: error: ‘v8::Persistent::Persistent(const v8::Persistent&) [with T = v8::String, v8::Persistent = v8::Persistentv8::String]’ is private
../src/binding.cc:582:50: error: within this context
../src/binding.cc:597:10: error: initialising argument 1 of ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’
../src/binding.cc: In member function ‘void Client::emit(v8::Persistentv8::String)’:
../src/binding.cc:590:48: error: conversion from ‘v8::Persistentv8::String’ to non-scalar type ‘v8::Handlev8::Value’ requested
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T_ v8::Persistent::operator->() const [with T = v8::Function]’ is private
../src/binding.cc:592:11: error: within this context
/home/madra/.node-gyp/0.11.4/src/node_object_wrap.h:132:30: error: ‘v8::Persistentv8::Object node::ObjectWrap::handle_’ is private
../src/binding.cc:592:18: error: within this context
../src/binding.cc:592:39: error: no matching function for call to ‘v8::Function::Call(v8::Persistentv8::Object&, int, v8::Handlev8::Value [1])’
../src/binding.cc:592:39: note: candidate is:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: v8::Localv8::Value v8::Function::Call(v8::Handlev8::Object, int, v8::Handlev8::Value_)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::Object’ to ‘v8::Handlev8::Object’
../src/binding.cc: In member function ‘void Client::emit_error(v8::Persistentv8::String, bool, unsigned int, const char_)’:
../src/binding.cc:608:62: error: no matching function for call to ‘v8::Object::Set(v8::Persistentv8::String&, v8::Localv8::Integer)’
../src/binding.cc:608:62: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: bool v8::Object::Set(v8::Handlev8::Value, v8::Handlev8::Value, v8::PropertyAttribute)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: bool v8::Object::Set(uint32_t, v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:609:53: error: conversion from ‘v8::Persistentv8::String’ to non-scalar type ‘v8::Handlev8::Value’ requested
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T* v8::Persistent::operator->() const [with T = v8::Function]’ is private
../src/binding.cc:611:11: error: within this context
/home/madra/.node-gyp/0.11.4/src/node_object_wrap.h:132:30: error: ‘v8::Persistentv8::Object node::ObjectWrap::handle_’ is private
../src/binding.cc:611:18: error: within this context
../src/binding.cc:611:39: error: no matching function for call to ‘v8::Function::Call(v8::Persistentv8::Object&, int, v8::Handlev8::Value [2])’
../src/binding.cc:611:39: note: candidate is:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: v8::Localv8::Value v8::Function::Call(v8::Handlev8::Object, int, v8::Handlev8::Value_)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::Object’ to ‘v8::Handlev8::Object’
../src/binding.cc: In member function ‘void Client::emit_done(my_ulonglong, my_ulonglong, my_ulonglong)’:
../src/binding.cc:622:57: error: no matching function for call to ‘v8::Object::Set(v8::Persistentv8::String&, v8::Localv8::Number)’
../src/binding.cc:622:57: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: bool v8::Object::Set(v8::Handlev8::Value, v8::Handlev8::Value, v8::PropertyAttribute)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: bool v8::Object::Set(uint32_t, v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:626:46: error: no matching function for call to ‘v8::Object::Set(v8::Persistentv8::String&, v8::Localv8::Number)’
../src/binding.cc:626:46: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: bool v8::Object::Set(v8::Handlev8::Value, v8::Handlev8::Value, v8::PropertyAttribute)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: bool v8::Object::Set(uint32_t, v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:627:55: error: no matching function for call to ‘v8::Object::Set(v8::Persistentv8::String&, v8::Localv8::Number)’
../src/binding.cc:627:55: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: bool v8::Object::Set(v8::Handlev8::Value, v8::Handlev8::Value, v8::PropertyAttribute)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: bool v8::Object::Set(uint32_t, v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:628:57: error: conversion from ‘v8::Persistentv8::String’ to non-scalar type ‘v8::Handlev8::Value’ requested
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T_ v8::Persistent::operator->() const [with T = v8::Function]’ is private
../src/binding.cc:630:11: error: within this context
/home/madra/.node-gyp/0.11.4/src/node_object_wrap.h:132:30: error: ‘v8::Persistentv8::Object node::ObjectWrap::handle_’ is private
../src/binding.cc:630:18: error: within this context
../src/binding.cc:630:39: error: no matching function for call to ‘v8::Function::Call(v8::Persistentv8::Object&, int, v8::Handlev8::Value [2])’
../src/binding.cc:630:39: note: candidate is:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: v8::Localv8::Value v8::Function::Call(v8::Handlev8::Object, int, v8::Handlev8::Value_)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::Object’ to ‘v8::Handlev8::Object’
../src/binding.cc: In member function ‘void Client::emit_row()’:
../src/binding.cc:660:41: error: no matching function for call to ‘v8::Persistentv8::String::New(v8::Localv8::String)’
../src/binding.cc:660:41: note: candidate is:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note: static T_ v8::Persistent::New(v8::Isolate_, T_) [with T = v8::String]
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note: candidate expects 2 arguments, 1 provided
../src/binding.cc:681:58: error: no matching function for call to ‘v8::Object::Set(v8::Persistentv8::String&, v8::Handlev8::Value&)’
../src/binding.cc:681:58: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: bool v8::Object::Set(v8::Handlev8::Value, v8::Handlev8::Value, v8::PropertyAttribute)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2036:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: bool v8::Object::Set(uint32_t, v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2040:8: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:683:55: error: conversion from ‘v8::Persistentv8::String’ to non-scalar type ‘v8::Handlev8::Value’ requested
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T* v8::Persistent::operator->() const [with T = v8::Function]’ is private
../src/binding.cc:685:11: error: within this context
/home/madra/.node-gyp/0.11.4/src/node_object_wrap.h:132:30: error: ‘v8::Persistentv8::Object node::ObjectWrap::handle_’ is private
../src/binding.cc:685:18: error: within this context
../src/binding.cc:685:39: error: no matching function for call to ‘v8::Function::Call(v8::Persistentv8::Object&, int, v8::Handlev8::Value [2])’
../src/binding.cc:685:39: note: candidate is:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: v8::Localv8::Value v8::Function::Call(v8::Handlev8::Object, int, v8::Handlev8::Value_)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2336:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::Object’ to ‘v8::Handlev8::Object’
/home/madra/.node-gyp/0.11.4/src/node_object_wrap.h: In static member function ‘static v8::Handlev8::Value Client::New(const v8::Arguments&)’:
/home/madra/.node-gyp/0.11.4/src/node_object_wrap.h:132:30: error: ‘v8::Persistentv8::Object node::ObjectWrap::handle_’ is private
../src/binding.cc:704:48: error: within this context
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T_ v8::Persistent::operator->() const [with T = v8::Object]’ is private
../src/binding.cc:704:55: error: within this context
../src/binding.cc:704:72: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:704:72: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc: In static member function ‘static v8::Handlev8::Value Client::Connect(const v8::Arguments&)’:
../src/binding.cc:749:53: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:749:53: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:750:56: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:750:56: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:751:51: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:751:51: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:752:53: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:752:53: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:753:57: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:753:57: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:754:49: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:754:49: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:755:59: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:755:59: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:756:59: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:756:59: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:757:55: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:757:55: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:758:61: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:758:61: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:759:51: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:759:51: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:818:36: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
../src/binding.cc:821:62: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:821:62: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:822:64: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:822:64: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:823:60: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:823:60: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:824:68: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:824:68: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:825:68: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:825:68: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:826:68: error: no matching function for call to ‘v8::Object::Get(v8::Persistentv8::String&)’
../src/binding.cc:826:68: note: candidates are:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: v8::Localv8::Value v8::Object::Get(v8::Handlev8::Value)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2054:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘v8::Handlev8::Value’
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: v8::Localv8::Value v8::Object::Get(uint32_t)
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:2056:16: note: no known conversion for argument 1 from ‘v8::Persistentv8::String’ to ‘uint32_t {aka unsigned int}’
../src/binding.cc:839:38: warning: deprecated conversion from string constant to ‘char_’ [-Wwrite-strings]
../src/binding.cc: In static member function ‘static void Client::Initialize(v8::Handlev8::Object)’:
../src/binding.cc:921:62: warning: ‘static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)’ is deprecated (declared at /home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:3263) [-Wdeprecated-declarations]
../src/binding.cc:924:65: error: no matching function for call to ‘v8::Persistentv8::FunctionTemplate::New(v8::Localv8::FunctionTemplate&)’
../src/binding.cc:924:65: note: candidate is:
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note: static T* v8::Persistent::New(v8::Isolate_, T_) [with T = v8::FunctionTemplate]
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:5585:4: note: candidate expects 2 arguments, 1 provided
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T* v8::Persistent::operator->() const [with T = v8::FunctionTemplate]’ is private
../src/binding.cc:925:25: error: within this context
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T* v8::Persistent::operator->() const [with T = v8::FunctionTemplate]’ is private
../src/binding.cc:926:25: error: within this context
../src/binding.cc:928:71: error: could not convert ‘Client_constructor’ from ‘v8::Persistentv8::FunctionTemplate’ to ‘v8::Handlev8::FunctionTemplate’
../src/binding.cc:929:67: error: could not convert ‘Client_constructor’ from ‘v8::Persistentv8::FunctionTemplate’ to ‘v8::Handlev8::FunctionTemplate’
../src/binding.cc:930:77: error: could not convert ‘Client_constructor’ from ‘v8::Persistentv8::FunctionTemplate’ to ‘v8::Handlev8::FunctionTemplate’
../src/binding.cc:931:69: error: could not convert ‘Client_constructor’ from ‘v8::Persistentv8::FunctionTemplate’ to ‘v8::Handlev8::FunctionTemplate’
../src/binding.cc:932:65: error: could not convert ‘Client_constructor’ from ‘v8::Persistentv8::FunctionTemplate’ to ‘v8::Handlev8::FunctionTemplate’
../src/binding.cc:933:75: error: could not convert ‘Client_constructor’ from ‘v8::Persistentv8::FunctionTemplate’ to ‘v8::Handlev8::FunctionTemplate’
../src/binding.cc:935:40: error: ‘NODE_PSYMBOL’ was not declared in this scope
/home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:771:3: error: ‘T* v8::Persistent::operator->() const [with T = v8::FunctionTemplate]’ is private
../src/binding.cc:969:43: error: within this context
../src/binding.cc: In function ‘void init(v8::Handlev8::Object)’:
../src/binding.cc:1001:45: warning: ‘static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)’ is deprecated (declared at /home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:3263) [-Wdeprecated-declarations]
../src/binding.cc:1003:46: warning: ‘static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)’ is deprecated (declared at /home/madra/.node-gyp/0.11.4/deps/v8/include/v8.h:3263) [-Wdeprecated-declarations]
make: *** [Release/obj.target/sqlclient/src/binding.o] Error 1
make: Leaving directory /media/data/firelytics/fl-git/node_modules/mariasql/build' gyp ERR! build error gyp ERR! stack Error:make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:103:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.2.0-32-generic-pae
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /media/data/firelytics/fl-git/node_modules/mariasql
gyp ERR! node -v v0.11.4
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

'end' event emitted on 'error'

According to the documentation, the 'end' event should not be emitted if an 'error' occurs, but I'm getting both events emitted when I use a malformed query.

Reopening issue #11

I can confirm that got same error.
Assertion failed: ((handle)->flags & UV__HANDLE_CLOSING) == 0, file src\win\poll.c, line 190

This is not issue, but just question...

I use express.js

which is corrrect??

1

var c = new Client();

exports.login = function login () {
c.connect();
c.end();
}

2

exports.login = function login () {
var c = new Client();
c.connect();
c.end();
}

prepare and null

Hi there,

I'm not sure if this is the correct behavior, but if a variable is not set, shouldn't it be NULL instead of 0?

i.e c.prepare('REPLACE INTO table (:value1, :value2)');
and if value2 is not defined in the query, it should be NULL. Hope this makes sense. thanks.

Error on installation

I got the following errors when attempting to install. Note that I attempted to install once and got an error due to the lack of Python installed. I installed python and ran the mariasql install again. Also note, after I got the errors below, I looked in the node_modules folder and there is no mariasql folder there.

My installed components are:

  • Windows 2012 server 64-bit
  • MariaDB v10.0.4. Alpha
  • node.js v0.10.15 for 64-bit Windows
  • npm install underscore (v1.5.1)
  • npm install express (v3.3.4)
  • npm install mariasql (0.1.19)
    • Python v2.7.5 to C:\Python27\
    • New environment variable called PYTHON set to C:\Python27\python.exe

ERROR MESSAGES:

C:\code>npm install mariasql
npm http GET https://registry.npmjs.org/mariasql
npm http 304 https://registry.npmjs.org/mariasql
npm http GET https://registry.npmjs.org/lru-cache/2.3.0
npm http 304 https://registry.npmjs.org/lru-cache/2.3.0

[email protected] install C:\code\node_modules\mariasql
node-gyp rebuild

C:\code\node_modules\mariasql>node "C:\Program Files\nodejs\node_modules\npm\bin
\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp http GET http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
gyp http GET http://nodejs.org/dist/v0.10.15/node.lib
gyp http GET http://nodejs.org/dist/v0.10.15/x64/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.15/x64/node.lib
gyp http 200 http://nodejs.org/dist/v0.10.15/node.lib
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\code\node_modules\mariasql\build\deps\libmariadbclient\libmysql\clientlib.vc
xproj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.prop
s" was not found. Confirm that the path in the declaration is correct,
and that the file exists on disk.
C:\code\node_modules\mariasql\build\deps\libmariadbclient\mysys\mysys.vcxproj(1
8,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was
not found. Confirm that the path in the declaration is correct, and th
at the file exists on disk.
C:\code\node_modules\mariasql\build\deps\libmariadbclient\strings\strings.vcxpr
oj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props"
was not found. Confirm that the path in the declaration is correct, an
d that the file exists on disk.
C:\code\node_modules\mariasql\build\deps\libmariadbclient\extra\yassl\taocrypt
taocrypt.vcxproj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.D
efault.props" was not found. Confirm that the path in the declaration
is correct, and that the file exists on disk.
C:\code\node_modules\mariasql\build\deps\libmariadbclient\vio\vio.vcxproj(18,3)
: error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not
found. Confirm that the path in the declaration is correct, and that t
he file exists on disk.
C:\code\node_modules\mariasql\build\deps\libmariadbclient\extra\yassl\yassl.vcx
proj(18,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props
" was not found. Confirm that the path in the declaration is correct,
and that the file exists on disk.
C:\code\node_modules\mariasql\build\deps\libmariadbclient\zlib\zlib.vcxproj(18,
3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was no
t found. Confirm that the path in the declaration is correct, and that
the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\code\node_modules\mariasql
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

C:\code>

Query event is lost if combined with abort and error with multiple statements enabled

var Client = require('mariasql');

var c = new Client();
c.connect({multiStatements: true});

var cnt = 0;
results = c.query('SELECT 1; SELECT 2 FROM nonexists; SELECT 3');
results.on('result', function(query) {
  cnt++;
  query.on('abort', function() { console.log('Query Aborted'); });
  query.on('error', function(err) { console.log('Query Error', err); });
  query.on('end', function(info) { console.log('Query Ended', info); });
  if (cnt == 2) query.abort();
});
results.on('abort', function() { console.log('Result Aborted'); });
results.on('end', function() { console.log('Result Ended'); });

We would expect following output

Query End { insertId: 0, affectedRows: 0, numRows: 1 }
Query Aborted / Query Error // which one to expect is not specified in the doc...
Result Ended

While actually what we get is

Query Ended { insertId: 0, affectedRows: 0, numRows: 1 }
Result Ended

Event to the second query is missing.

Interestingly, this may happen to each query in the Results except for the first one.

npm install issue w/ node-gyp - OSX (Mavericks)

Getting an error in building node-gyp saying libtool: unrecognized option-static'` at the bottom. Google returns no clear solutions.

> [email protected] install /Users/mariusmiliunas/git/chatter-plot/node_modules/mariasql
> node-gyp rebuild

  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/aes.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/aestables.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/algebra.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/algebra.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/algebra.hpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:39:38: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
                                     ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/algebra.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/algebra.hpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/algebra.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/algebra.hpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
3 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/arc4.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/asn.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/asn.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/asn.hpp:29:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:39:38: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
                                     ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/asn.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/asn.hpp:29:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/asn.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/asn.hpp:29:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
3 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/bftables.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/blowfish.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/coding.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/coding.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/coding.hpp:26:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/coding.hpp:38:14: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit HexEncoder(Source& s) : plain_(s) { Encode(); }
             ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/coding.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/coding.hpp:26:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/coding.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/coding.hpp:26:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
3 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/des.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/dh.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/dh.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/dh.hpp:27:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:39:38: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
                                     ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/dh.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/dh.hpp:27:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/dh.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/dh.hpp:27:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
3 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/dsa.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/dsa.cpp:21:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/dsa.hpp:25:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:39:38: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
                                     ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/dsa.cpp:21:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/dsa.hpp:25:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/dsa.cpp:21:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/dsa.hpp:25:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
3 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/file.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/file.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:27:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:39:38: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
                                     ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/file.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:27:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/file.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:27:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
3 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/hash.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/hc128.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/integer.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/integer.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:39:38: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
                                     ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/integer.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/integer.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/integer.cpp:24:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/src/integer.cpp:2381:22: note: in instantiation of member function 'TaoCrypt::Block<unsigned long,
      TaoCrypt::AllocatorWithCleanup<unsigned long> >::Block' requested here
    AlignedWordBlock workspace(aSize + bSize);
                     ^
4 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/md2.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/md2.cpp:23:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/md2.hpp:27:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/src/md2.cpp:30:7: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    : X_(X_SIZE), C_(BLOCK_SIZE), buffer_(BLOCK_SIZE)
      ^
1 warning generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/md4.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/md5.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/misc.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/rabbit.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/random.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/ripemd.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/rsa.o
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/rsa.cpp:22:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/rsa.hpp:25:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:129:52: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    explicit Block(word32 s = 0) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                   ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:39:38: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    explicit Source(word32 sz = 0) : buffer_(sz), current_(0) {}
                                     ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/rsa.cpp:22:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/rsa.hpp:25:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:132:54: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const T* buff, word32 s) : sz_(s), buffer_(allocator_.allocate(sz_))
                                                     ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:40:40: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
    Source(const byte* b, word32 sz) : buffer_(b, sz), current_(0) {}
                                       ^
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/src/rsa.cpp:22:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/rsa.hpp:25:
In file included from ../deps/libmariadbclient/extra/yassl/taocrypt/include/integer.hpp:37:
../deps/libmariadbclient/extra/yassl/taocrypt/include/block.hpp:135:55: warning: field 'allocator_' is uninitialized when used here [-Wuninitialized]
    Block(const Block& that) : sz_(that.sz_), buffer_(allocator_.allocate(sz_))
                                                      ^
../deps/libmariadbclient/extra/yassl/taocrypt/include/file.hpp:76:11: note: in instantiation of member function 'TaoCrypt::Block<unsigned char,
      TaoCrypt::AllocatorWithCleanup<unsigned char> >::Block' requested here
        : buffer_(that.buffer_), current_(that.current_) {}
          ^
3 warnings generated.
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/sha.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/tftables.o
  CXX(target) Release/obj.target/taocrypt/deps/libmariadbclient/extra/yassl/taocrypt/src/twofish.o
  LIBTOOL-STATIC Release/taocrypt.a
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [Release/taocrypt.a] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/mariusmiliunas/.nvm/v0.10.28/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/Users/mariusmiliunas/.nvm/v0.10.28/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mariusmiliunas/git/chatter-plot/node_modules/mariasql
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mariasql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.2.0
npm ERR! command "/Users/mariusmiliunas/.nvm/v0.10.28/bin/node" "/Users/mariusmiliunas/.nvm/v0.10.28/bin/npm" "install"
npm ERR! cwd /Users/mariusmiliunas/git/chatter-plot
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/mariusmiliunas/git/chatter-plot/npm-debug.log
npm ERR! not ok code 0

Additionally tried with @0.1.20 which works on my ubuntu server, and I still got this same error.

node.js mariasql undefined return and variable test also

var Client = require('mariasql');
var inspect = require('util').inspect;
var test;

var c = new Client();
    c.connect({
      host: '127.0.0.1',
      user: 'root',
      password: '38nudel5nu',
      db: 'artikel2'
});

var login = function(){

    console.log("LOGIN\n");

    c.on('connect', function() {
       console.log('Client connected');
     })
     .on('error', function(err) {
       console.log('Client error: ' + err);
     })
     .on('close', function(hadError) {
       console.log('Client closed');
     });
}

var end = function(){
    console.log("EXIT");
    c.end();
}


login();

var xx = function(){
    c.query('SELECT COUNT(ArtikelID) AS Count FROM artikel')
 .on('result', function(res) {
   res.on('row', function(row) {
     console.log('Result row: ' + inspect(row.Count));
    test = inspect(row.Count);
    return inspect(row.Count);
   })
   .on('error', function(err) {
     console.log('Result error: ' + inspect(err));
   })
   .on('end', function(info) {
     console.log('Result finished successfully');
   });
 })
 .on('end', function() {
   console.log('Done with all results');
 }); 

}

ulli = xx();

console.log("Here is Text from ulli : " + ulli + "\ttest: " + test);

Output:

LOGIN

Here is Text from ulli : undefined test: undefined
Client connected
Result row: '39'
Result finished successfully
Done with all results

Is transaction supported?

I ran the following transaction query and it's failing.

START TRANSACTION;  DELETE FROM  myTable where date = '2014-07-23'; INSERT INTO myTable (date,device_type,software_version,operation,bucket,bucket_count,metric_count) values ('2014-07-23','XXXXX1','13.4.1.0','Discharge','1','1','2'),('2014-07-23','XXXXX2','14.4.1.0','Discharge2','0','1','1'); commit ;

Here is how I'm calling query

Client.query(sql, true)
                .on('result', function(res) {
                    res.on('row', function(row) {
                            return callback(null, row);
                        })
                        .on('error', function(err) {
                            console.log('Result error: ' + err);
                            return callback(err, null);
                        })
                        .on('end', function(info) {
                            console.log('Result finished successfully');
                        });
                })
                .on('end', function() {
                    console.log('Done with all results');
                });

How do I make this work?

Great work

Hi Brian,

just wanted to say you did some great work with this library, I've done some benchmarks recently and your lib is at least 2x faster at parsing row data than my current library : ).

Cheers,
Felix

Windows 7 npm install fail

Before I get the following error, I am getting a "No Python Installed" error. Then I installed python using chocolatey. And then I am getting the error below when executing npm install --save mariasql

npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm http GET https://registry.npmjs.org/mariasql
npm http 304 https://registry.npmjs.org/mariasql
npm http GET https://registry.npmjs.org/lru-cache/2.3.1
npm http 304 https://registry.npmjs.org/lru-cache/2.3.1

> [email protected] install C:\Users\theuser\sandbox\js\running\node_modules\mariasql
> node-gyp rebuild


C:\Users\theuser\sandbox\js\running\node_modules\mariasql>node "c:\Users\theuser\sandbox\js\running\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
  client.c
  pack.c
  mysql_async.c
  my_time.c
  client_plugin.c
  libmysql.c
  errmsg.c
  password.c
  net_serv.cc
  clientlib.vcxproj -> C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\Release\\clientlib.lib
  mf_qsort.c
  my_winerr.c
  my_winthread.c
  my_alloc.c
  my_getsystime.c
  mf_loadpath.c
  mf_format.c
  charset.c
  my_windac.c
  mf_wcomp.c
  my_open.c
  charset-def.c
  list.c
  errors.c
  my_div.c
  my_read.c
  my_write.c
  typelib.c
  sha1.c
  my_delete.c
  my_once.c
  my_fstream.c
  my_pthread.c
  mf_dirname.c
  array.c
  my_getwd.c
  default.c
  my_symlink.c
  my_access.c
  mf_arr_appstr.c
  mulalloc.c
  mf_tempfile.c
  my_compress.c
  my_lib.c
  my_wincond.c
  my_static.c
  my_error.c
  mf_pack.c
  mf_path.c
  string.c
  my_mess.c
  my_rnd.c
  my_create.c
  thr_mutex.c
  mf_fn_ext.c
  my_winfile.c
  mf_unixpath.c
  my_thr_init.c
  my_fopen.c
  my_malloc.c
  my_seek.c
  my_context.c
  my_init.c
  mysys.vcxproj -> C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\Release\\mysys.lib
  longlong2str.c
  strmov.c
  ctype-win1250ch.c
  ctype-utf8.c
  ctype.c
  is_prefix.c
  ctype-big5.c
  ctype-tis620.c
  ctype-simple.c
  str2int.c
  strfill.c
  strmake.c
  ctype-mb.c
  bmove_upp.c
  ctype-eucjpms.c
  bchange.c
  ctype-bin.c
  xml.c
  strcont.c
  ctype-sjis.c
  strxnmov.c
  ctype-gb2312.c
  strnlen.c
  ctype-uca.c
  my_strtoll10.c
  ctype-cp932.c
  dtoa.c
  strmov_overlapp.c
  ctype-gbk.c
  strcend.c
  ctype-ujis.c
  strxmov.c
  ctype-czech.c
  ctype-euc_kr.c
  my_vsnprintf.c
  strend.c
  ctype-ucs2.c
  int2str.c
  strnmov.c
  str_alloc.c
  ctype-latin1.c
  ctype-extra.c
  llstr.c
  strings.vcxproj -> C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\Release\\strings.lib
  hc128.cpp
  blowfish.cpp
  dsa.cpp
  integer.cpp
  md5.cpp
  arc4.cpp
  rabbit.cpp
  random.cpp
  aes.cpp
  rsa.cpp
  misc.cpp
  aestables.cpp
  twofish.cpp
  md2.cpp
  bftables.cpp
  md4.cpp
  des.cpp
  algebra.cpp
  coding.cpp
  hash.cpp
  file.cpp
  asn.cpp
  ripemd.cpp
  tftables.cpp
  sha.cpp
  dh.cpp
  taocrypt.vcxproj -> C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\Release\\taocrypt.lib
  vio.c
  viossl.c
  viosslfactories.c
  viosocket.c
  vio.vcxproj -> C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\Release\\vio.lib
  handshake.cpp
  ssl.cpp
  crypto_wrapper.cpp
  cert_wrapper.cpp
  yassl_int.cpp
  lock.cpp
  yassl_imp.cpp
  buffer.cpp
  socket_wrapper.cpp
  yassl_error.cpp
  timer.cpp
  log.cpp
  yassl.vcxproj -> C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\Release\\yassl.lib
  trees.c
  gzlib.c
  inffast.c
  uncompr.c
  inftrees.c
  gzread.c
  infback.c
  gzclose.c
  compress.c
  zutil.c
  crc32.c
  adler32.c
  inflate.c
  gzwrite.c
  deflate.c
  zlib.vcxproj -> C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\Release\\zlib.lib
  binding.cc
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build
..\src\binding.cc(164): error C2504: 'ObjectWrap' : base class undefined [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(167): error C2143: syntax error : missing ';' before '*' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(167): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(167): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(168): error C2146: syntax error : missing ';' before identifier 'mysql_sock' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(168): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(168): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(258): error C2061: syntax error : identifier 'uv_handle_t' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(561): error C2061: syntax error : identifier 'uv_poll_t' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(769): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(769): error C2143: syntax error : missing ',' before '&' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(789): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(789): error C2143: syntax error : missing ',' before '&' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(811): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(811): error C2143: syntax error : missing ',' before '&' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(946): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(946): error C2143: syntax error : missing ',' before '&' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(958): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(958): error C2143: syntax error : missing ',' before '&' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(978): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(978): error C2143: syntax error : missing ',' before '&' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(991): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(991): error C2143: syntax error : missing ',' before '&' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(201): error C2065: 'poll_handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(210): error C2065: 'mysql_sock' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(243): error C2065: 'poll_handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(244): error C2065: 'poll_handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(244): error C3861: 'uv_poll_stop': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(245): error C2065: 'poll_handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(245): error C2065: 'poll_handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(245): error C2065: 'poll_handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(250): error C2065: 'uv_handle_t' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(250): error C2059: syntax error : ')' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(250): error C3861: 'uv_close': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(259): error C2248: 'v8::HandleScope::HandleScope' : cannot access private member declared in class 'v8::HandleScope' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(768) : see declaration of 'v8::HandleScope::HandleScope'
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(743) : see declaration of 'v8::HandleScope'
..\src\binding.cc(260): error C2065: 'handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(260): error C2227: left of '->data' must point to class/struct/union/generic type [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          type is ''unknown-type''
..\src\binding.cc(263): error C2440: 'initializing' : cannot convert from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No constructor could take the source type, or constructor overload resolution was ambiguous
..\src\binding.cc(264): error C2661: 'v8::Local<T>::New' : no overloaded function takes 1 arguments [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Boolean
          ]
..\src\binding.cc(266): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
          did you intend to use '.' instead?
..\src\binding.cc(266): error C2039: 'Call' : is not a member of 'v8::Persistent<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
..\src\binding.cc(266): error C2039: 'handle_' : is not a member of 'Client' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          ..\src\binding.cc(164) : see declaration of 'Client'
..\src\binding.cc(269): error C2039: 'poll_handle' : is not a member of 'Client' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          ..\src\binding.cc(164) : see declaration of 'Client'
..\src\binding.cc(269): error C2039: 'poll_handle' : is not a member of 'Client' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          ..\src\binding.cc(164) : see declaration of 'Client'
..\src\binding.cc(269): error C2039: 'poll_handle' : is not a member of 'Client' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          ..\src\binding.cc(164) : see declaration of 'Client'
..\src\binding.cc(313): error C2065: 'mysql_sock' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(315): error C2065: 'uv_poll_t' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(315): error C2059: syntax error : ')' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(318): error C2065: 'mysql_sock' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(316): error C3861: 'uv_poll_init_socket': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(316): error C3861: 'uv_default_loop': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(319): error C2065: 'UV_READABLE' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(319): error C3861: 'uv_poll_start': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(320): error C2227: left of '->data' must point to class/struct/union/generic type [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          type is ''unknown-type''
..\src\binding.cc(548): error C2065: 'uv_handle_t' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(548): error C2059: syntax error : ')' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(548): error C3861: 'uv_close': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(555): error C2065: 'UV_READABLE' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(557): error C2065: 'UV_WRITABLE' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(558): error C3861: 'uv_poll_start': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(562): error C2248: 'v8::HandleScope::HandleScope' : cannot access private member declared in class 'v8::HandleScope' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(768) : see declaration of 'v8::HandleScope::HandleScope'
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(743) : see declaration of 'v8::HandleScope'
..\src\binding.cc(563): error C2065: 'handle' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(563): error C2227: left of '->data' must point to class/struct/union/generic type [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          type is ''unknown-type''
..\src\binding.cc(567): error C2065: 'status' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(567): error C2228: left of '.code' must have class/struct/union [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          type is ''unknown-type''
..\src\binding.cc(567): error C3861: 'uv_last_error': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(567): error C3861: 'uv_default_loop': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(578): error C2065: 'status' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(581): error C2065: 'events' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(581): error C2065: 'UV_READABLE' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(583): error C2065: 'events' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(583): error C2065: 'UV_WRITABLE' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(585): error C2039: 'mysql_sock' : is not a member of 'Client' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          ..\src\binding.cc(164) : see declaration of 'Client'
..\src\binding.cc(587): error C2039: 'mysql_sock' : is not a member of 'Client' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          ..\src\binding.cc(164) : see declaration of 'Client'
..\src\binding.cc(587): error C2065: 'MSG_PEEK' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(587): error C3861: 'recv': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C2065: 'WSAECONNRESET' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C2065: 'WSAENOTCONN' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C2065: 'WSAECONNABORTED' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C2065: 'WSAENETRESET' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C2065: 'WSAENETDOWN' : undeclared identifier [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C3861: 'WSAGetLastError': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C3861: 'WSAGetLastError': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C3861: 'WSAGetLastError': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C3861: 'WSAGetLastError': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(588): error C3861: 'WSAGetLastError': identifier not found [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(598): error C2248: 'v8::HandleScope::HandleScope' : cannot access private member declared in class 'v8::HandleScope' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(768) : see declaration of 'v8::HandleScope::HandleScope'
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(743) : see declaration of 'v8::HandleScope'
..\src\binding.cc(599): error C2440: 'initializing' : cannot convert from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No constructor could take the source type, or constructor overload resolution was ambiguous
..\src\binding.cc(601): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
          did you intend to use '.' instead?
..\src\binding.cc(601): error C2039: 'Call' : is not a member of 'v8::Persistent<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
..\src\binding.cc(608): error C2248: 'v8::HandleScope::HandleScope' : cannot access private member declared in class 'v8::HandleScope' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(768) : see declaration of 'v8::HandleScope::HandleScope'
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(743) : see declaration of 'v8::HandleScope'
..\src\binding.cc(617): error C2664: 'bool v8::Object::Set(v8::Handle<T>,v8::Handle<T>,v8::PropertyAttribute)' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\ma
          with
          [
              T=v8::Value
          ]
          and
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\src\binding.cc(618): error C2440: 'initializing' : cannot convert from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No constructor could take the source type, or constructor overload resolution was ambiguous
..\src\binding.cc(620): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
          did you intend to use '.' instead?
..\src\binding.cc(620): error C2039: 'Call' : is not a member of 'v8::Persistent<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
..\src\binding.cc(629): error C2248: 'v8::HandleScope::HandleScope' : cannot access private member declared in class 'v8::HandleScope' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(768) : see declaration of 'v8::HandleScope::HandleScope'
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(743) : see declaration of 'v8::HandleScope'
..\src\binding.cc(631): warning C4244: 'argument' : conversion from 'my_ulonglong' to 'double', possible loss of data [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(631): error C2664: 'bool v8::Object::Set(v8::Handle<T>,v8::Handle<T>,v8::PropertyAttribute)' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\ma
          with
          [
              T=v8::Value
          ]
          and
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\src\binding.cc(635): warning C4244: 'argument' : conversion from 'my_ulonglong' to 'double', possible loss of data [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(635): error C2664: 'bool v8::Object::Set(v8::Handle<T>,v8::Handle<T>,v8::PropertyAttribute)' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\ma
          with
          [
              T=v8::Value
          ]
          and
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\src\binding.cc(636): warning C4244: 'argument' : conversion from 'my_ulonglong' to 'double', possible loss of data [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
..\src\binding.cc(636): error C2664: 'bool v8::Object::Set(v8::Handle<T>,v8::Handle<T>,v8::PropertyAttribute)' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\ma
          with
          [
              T=v8::Value
          ]
          and
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\src\binding.cc(637): error C2440: 'initializing' : cannot convert from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No constructor could take the source type, or constructor overload resolution was ambiguous
..\src\binding.cc(639): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
          did you intend to use '.' instead?
..\src\binding.cc(639): error C2039: 'Call' : is not a member of 'v8::Persistent<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
..\src\binding.cc(645): error C2248: 'v8::HandleScope::HandleScope' : cannot access private member declared in class 'v8::HandleScope' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(768) : see declaration of 'v8::HandleScope::HandleScope'
          C:\Users\theuser\.node-gyp\0.11.11\deps\v8\include\v8.h(743) : see declaration of 'v8::HandleScope'
..\src\binding.cc(675): error C2660: 'v8::Persistent<T>::New' : function does not take 1 arguments [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::String
          ]
..\src\binding.cc(701): error C2664: 'bool v8::Object::Set(v8::Handle<T>,v8::Handle<T>,v8::PropertyAttribute)' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\ma
          with
          [
              T=v8::Value
          ]
          and
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\src\binding.cc(710): error C2664: 'bool v8::Object::Set(v8::Handle<T>,v8::Handle<T>,v8::PropertyAttribute)' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\ma
          with
          [
              T=v8::Value
          ]
          and
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\src\binding.cc(711): error C2664: 'bool v8::Object::Set(v8::Handle<T>,v8::Handle<T>,v8::PropertyAttribute)' : cannot convert parameter 1 from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\ma
          with
          [
              T=v8::Value
          ]
          and
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
..\src\binding.cc(722): error C2440: 'initializing' : cannot convert from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No constructor could take the source type, or constructor overload resolution was ambiguous
..\src\binding.cc(723): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
          did you intend to use '.' instead?
..\src\binding.cc(723): error C2039: 'Call' : is not a member of 'v8::Persistent<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
..\src\binding.cc(725): error C2440: 'initializing' : cannot convert from 'v8::Persistent<T>' to 'v8::Handle<T>' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::String
          ]
          and
          [
              T=v8::Value
          ]
          No constructor could take the source type, or constructor overload resolution was ambiguous
..\src\binding.cc(726): error C2819: type 'v8::Persistent<T>' does not have an overloaded member 'operator ->' [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
          with
          [
              T=v8::Function
          ]
..\src\binding.cc(726): fatal error C1003: error count exceeds 100; stopping compilation [C:\Users\theuser\sandbox\js\running\node_modules\mariasql\build\sqlclient.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Users\theuser\sandbox\js\running\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:879:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Users\\theuser\\sandbox\\js\\running\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\theuser\sandbox\js\running\node_modules\mariasql
gyp ERR! node -v v0.11.11
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mariasql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\theuser\\sandbox\\js\\running\\\\node.exe" "C:\\Users\\theuser\\sandbox\\js\\running\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "mariasql"
npm ERR! cwd C:\Users\theuser\sandbox\js\running
npm ERR! node -v v0.11.11
npm ERR! npm -v 1.4.2
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\theuser\sandbox\js\running\npm-debug.log
npm ERR! not ok code 0

Installation Requirement

I just did a an 'npm install mariasql' and the installation failed as it was looking for a PYTHON variable to be set. Please add this requirement to the git home page where is shows requirements. Also, it would help if each mariasql version expressly tells us which Python version to use. Maybe even add a message in the error output to tell the user to install python and a url to go look for help?

Much appreciated guys! You are doing awesome work and I hope to provide feedback as we have selected this driver and mariadb for our new project.

The Architect

Make it possible to access the MYSQL_FIELD.types of a returned row

Hi there!

First of all, thanks for a cool project - this binding has been really easy to work with so far. I am using the binding to implement mariadb support in the sequelize/sequelize ORM.
Actually the support is almost there, only one thing is blocking my way. Before returning data to the user, we want to convert it to its proper javascript type. As an example, BLOB objects should be returned as Buffers, number as actual javascript float / int types instead of strings, and so on.

The mysql and postgres modules that we are using are doing this conversion automatically, but I would be completely happy just having access to the types as defined in enum_field_types in mysql_com.h for each query result.

I glanced shortly over the source code, but I am not very familiar with native nodejs bindings or c++ code in general, so I would need at least a couple of pointers if I were to implement this myself.

Any feedback / suggestions for workarounds or how this can be achieved are welcome :)

Memory leak?

var maria = require('mariasql');
var c = new maria();

function RunQuery (client) {
    client.query('SELECT * FROM documents')
    .on('end', function() {
        RunQuery(client);
    });
}

c.on('connect', function() {
    RunQuery(c);
});

c.connect({ ... });

This code makes node eat a lot of memory.

prepared statements

As I understand it .prepared only escapes the values and don't create a true prepared statement.

Is this true? If so, would it be possible to implement?

result abort event never emits

The abort event never emits, when running this testcase:

var Mariasql = require('mariasql');

var client = new Mariasql();

client.connect({
  host: '127.0.0.1',
  user: 'root',
  password: ''
});

client.on('connect', function () {
  var result = client.query('SELECT 1 + 1 AS solution');

  result.on('row', function (row) {
    console.log('row:', row);
  });

  result.once('end', function () {
    console.log('end emit');
  });

  result.once('abort', function () {
    console.log('abort emit');
  });

  result.abort();
});

Fail to install @mscdex

Hi,

Please check, I cannot install it from npm

[mdquang@sdc-centos-vm src]$ npm install mariasql
npm http GET https://registry.npmjs.org/mariasql
npm http 304 https://registry.npmjs.org/mariasql
npm http GET https://registry.npmjs.org/lru-cache/2.3.0
npm http 304 https://registry.npmjs.org/lru-cache/2.3.0

[email protected] install /usr/local/src/node_modules/mariasql
node-gyp rebuild

gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:65:16)
gyp ERR! stack at Object.self.commands.(anonymous function) as install
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:228:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:110:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:659:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:106:17)
gyp ERR! stack at maybeClose (child_process.js:773:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:840:5)
gyp ERR! System Linux 2.6.32-358.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/src/node_modules/mariasql
gyp ERR! node -v v0.11.8-pre
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

Thanks :)

Client error: Error: SSL connection error: Failed to set ciphers to use

When trying to use the SSL features, I receive this error. Here is my connect. Is there anything you notice immediately:

c.connect({
host: 'HOST',
user: 'USER',
password: 'PASS',
ssl: true,
key: '/path/key.pem',
cert: '/path/cert.pem',
ca: '/path/ca.pem'});

I am connecting to a mysql database.
The OS is Ubuntu 12.04.
I am running node v0.10.17.

Thanks,
Mark

Uncatchable Error "Not ready to query"

Using the module with our SQL database, I frequently get an uncatched exception "Not ready to query". I've looked at your code, and it seems to me that this error is not handled by you, and can not be catched reliably, as it occurs in a function that is called via process.nextTick.

Stacktrace:
[...]/node_modules/mariasql/lib/Client.js:340
this._client.query(this._curResults._query, this._curResults._useArray);
^
Error: Not ready to query
at Client._processQueries ([...]/node_modules/mariasql/lib/Client.js:340:20)
at [...]/node_modules/mariasql/lib/Client.js:239:38

Edit: if relevant, database is running MySQL (14.14 Distrib 5.1.73, for debian-linux-gnu (x86_64) using readline 6.1)

How to enable and to display connection option metadata?

Hello :),
probably someone can help me.

I used "felixge's - node-mysql" for my thesis. There i got column-informations (variable "fields") like name, table, db, orgTable for each column of the returned query-data.

Now i am searching something similar for mariasql.
I found this commit:
"Added metadata option to return column type and charsets"

I tried to enable for connection by setting "metadata = true".

c.connect({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar',
  metadata: true
});

Then i tried to get the metadata output in this was, but i failed:

c.query('SHOW DATABASES')
 .on('result', function(res) {
   res.on('row', function(row, metadata) {
     console.log('Result row: ' + inspect(row));
     console.log(metadata);  // added code line, but undefined returned
   })
   .on('error', function(err) {
     console.log('Result error: ' + inspect(err));
   })
   .on('end', function(info) {
     console.log('Result finished successfully');
   });
 })
 .on('end', function() {
   console.log('Done with all results');
 });

Now I have 2 questions and i hope someone can help or give an advice.
1.) How can i get metadata?
2.) Is there a plan to extend such metadata informations or how I can extend it?

A error when I used

hi,
when I execute one sql, mariasql has a error. I don't know the reason.

/home/admin/node-live/node_modules/mariasql/lib/Client.js:284
      this._client.query(this._curResults._query, this._curResults._useArray);
                   ^
Error: Not ready to query
    at Client._processQueries (/home/admin/node-live/node_modules/mariasql/lib/Client.js:284:20)
    at Client.query (/home/admin/node-live/node_modules/mariasql/lib/Client.js:185:38)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

npm error with node v0.10.4

First off thank you for your hard work on this amazing project.

I am attempting to install this module using Node v0.10.4, and NPM 1.2.18. When doing so using "sudo npm install mariasql" gyp throws an error. Please see the output below:

gyp ERR! Completion callback never invoked!
gyp ERR! System Darwin 12.3.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/dperussina/Documents/Titanium Studio Workspace/squawk.io-node.js/node_modules/mariasql
gyp ERR! node -v v0.10.4
gyp ERR! node-gyp -v v0.9.5
gyp ERR! This is a bug in node-gyp.
gyp ERR! Please file an Issue:
gyp ERR! https://github.com/TooTallNate/node-gyp/issues
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 6
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mariasql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "mariasql"
npm ERR! cwd /Users/dperussina/Documents/Titanium Studio Workspace/squawk.io-node.js
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/dperussina/Documents/Titanium Studio Workspace/squawk.io-node.js/npm-debug.log
npm ERR! not ok code 0

Assertion failed on Node v0.10.0 Win7x64/x86

It was necessary to recompile node-mariasql module after updating to node v0.10.0. So I made it. But now, after mariasql client was successfully connected to database, almost every client.end()call from any function
(eg setTimeout(function () { client.end() }, 10);) causes an error:
Assertion failed: ((handle)->flags & UV__HANDLE_CLOSING) == 0, file src\win\poll
.c, line 190

id of created row returned on insert?

I'm currently attempting to integrate node-mariasql into sequelize, but am having trouble because I don't see how to retrieve the auto-incremented id of a row that has been inserted into a table.

In node-mysql, this would be done with:

connection.query('INSERT INTO posts SET ?', {title: 'test'}, function(err, result) {
if (err) throw err;

console.log(result.insertId);
});

Is there a similar way to do this in node-mariasql?

connected property not set correctly

Hi when closing the connection the connected property isn't set to false. I'm pretty sure it is because this line should be self.connected = false;. I would have made a pull request but I don't see any tests, which is a bit confusing.

Windows install/compile failure, "MSB5014: File format version is not recognized."

Apologies for so spare of information, I've not got much to go on here.

The screendump when it errored:

build/binding.sln(1): Solution file error MSB5014: File format version is not recognized.  MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:236:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\code\damianb\erp\node_modules\mariasql
gyp ERR! node -v v0.8.14
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mariasql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\code\damianb\erp
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\code\damianb\erp\npm-debug.log
npm ERR! not ok code 0

npm-debug.log: https://gist.github.com/8a2654b18e7f73b4b1dc

Returned field type

It seems the fields within returned rows are all strings. Do we have to convert ourself into the right data type e.g. number, boolean, etc

Hard crash when ssl=true and connecting to offline server

When connecting to the database over SSL, but the server is offline, mariasql emits an error event with the following message:

Error: Can't connect to MySQL server on '127.0.0.1' (61)

Then before the close event is emitted, the following crash occurs:

node(28217,0x7fff75026310) malloc: *** error for object 0x103c55180: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

This will cause the Node.js process to exit. No bueno.

I'm on OS X 10.9.3, Node.js 0.10.28, mariasql v0.1.21, libmariadbclient 5.5.30.

client.end() error

Done with all results
Result row: { Database: 'information_schema' }
Result row: { Database: 'mysql' }
Result row: { Database: 'performance_schema' }
Result finished successfully
Done with all results

/root/node_modules/mariasql/lib/Client.js:188
    this._client.end();
                 ^
Error: Already closed
    at Client.destroy (/root/node_modules/mariasql/lib/Client.js:188:18)
    at Client._processQueries (/root/node_modules/mariasql/lib/Client.js:304:12)
    at /root/node_modules/mariasql/lib/Client.js:209:38
    at process._tickCallback (node.js:415:13)
    at process._tickFromSpinner (node.js:390:15)

my source:

var inspect = require('util').inspect;
var Client = require('mariasql');
var c = new Client();
c.connect({
        host: '127.0.0.1',
        user: 'root',
        password: '12345'
});
c.on('connect', function() {
        console.log('Client connected');
}).on('error', function(err) {
        console.log('Client error: ' + err);
}).on('close', function(hadError) {
        console.log('Client closed');
});
c.query('SHOW DATABASES').on('result', function(res) {
        res.on('row', function(row) {
                console.log('Result row: ' + inspect(row));
        }).on('error', function(err) {
                console.log('Result error: ' + inspect(err));
        }).on('end', function(info) {
                console.log('Result finished successfully');
        });
}).on('end', function() {
        console.log('Done with all results');
});

c.query('SHOW DATABASES').on('result', function(res) {
        res.on('row', function(row) {
                console.log('Result row: ' + inspect(row));
        }).on('error', function(err) {
                console.log('Result error: ' + inspect(err));
        }).on('end', function(info) {
                console.log('Result finished successfully');
        });
}).on('end', function() {
        console.log('Done with all results');
});

c.end(); // throw error

WHERE field IN (?)

I have an array of numbers, "ids", and I am trying to use them in a query:

c.query("SELECT * FROM geo.place WHERE id IN (?)", [ ids ])
.on('result', function (r) {
  r.on('row', function (row) { results.push(row) });
  r.on('end', function () { cb(results) });
});

However, this appears to only return one row. I could do this:

c.query("SELECT * FROM geo.place WHERE id IN (" + ids.join(',') + ")")
.on('result', function (r) {
  r.on('row', function (row) { results.push(row) });
  r.on('end', function () { cb(results) });
});

which works as expected. I can also dynamically create the "(?,?,...,?,?)" part of the query to match the number of values in ids:

var qs = [];
ids.forEach(function (v) { qs.push('?') });
c.query("SELECT * FROM geo.place WHERE id IN (" + qs.join(',') + ")", ids)
.on('result', function (r) {
  r.on('row', function (row) { results.push(row) });
  r.on('end', function () { cb(results) });
});

But is there a way to make the first method (the one which doesn't work) an acceptable use?

This is not issue, but just question

When I installed node-mariasql module I got 71 MB disk space usage and 740 files. We can't use such staff in our project. Is it possible to minify it to 1-10 files and 1-2MB ?

Assertion `status == 0' failed in cb_poll()

Sometimes one node-worker exits with the following error:

node: ../src/binding.cc:581: static void Client::cb_poll(uv_poll_t*, int, int):
    Assertion `status == 0' failed.

Possibly this happens after MySQL-Server closes the connection after idle timeout (60 seconds in our case).

This was the state when the assertion failed:

  • status = -1
  • uv_last_error(uv_default_loop()).code = EBADF
  • obj->state = STATE_QUERYING (for STATE_CONNECTING this case is handled some lines above)

The error is often (but not always) reproducable, sometimes a normal error-event is thrown with message "Disconnected from the server".

Maybe this relates to Issue #55 (Uncatchable Error "Not ready to query").

Fails to build - CentOS 6 32 bit

../deps/libmariadbclient/mysys/my_context.c: Assembler messages:
../deps/libmariadbclient/mysys/my_context.c:457: Error: CFI instruction used without previous .cfi_startproc
make: *** [Release/obj.target/mysys/deps/libmariadbclient/mysys/my_context.o] Error 1
make: Leaving directory `/opt/games/node_modules/mariasql/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:256:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 3.8.4-linode50
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/games/node_modules/mariasql
gyp ERR! node -v v0.8.22
gyp ERR! node-gyp -v v0.8.5
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mariasql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.8.4-linode50
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "git://github.com/mscdex/node-mariasql.git"
npm ERR! cwd /opt/games
npm ERR! node -v v0.8.22
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /opt/games/npm-debug.log

Works on 64bit.

strange behavior

I've written a small suite of jasmine tests for a few db models using node-mariasql. On my desktop PC (Fedora 17), tests run as expected. Yet, in a VMware vm and VirtualBox vm running CentOS 5.9 and CentOS 6.4, and on my RackSpace Cloud Server i get the following:

bash >jasmine-node spec/
.node: ../src/binding.cc:550: static void Client::cb_poll(uv_poll_t*, int, int): Assertion `status == 0' failed.
Aborted

bash >npm ls mariasql
└── [email protected]

not sure how to debug further.

Buffers not handled correctly

I know the docs briefly mention that everything is converted to utf8, but it really shouldn't do this. I'm trying to insert a binary hash into the database which I create via the standard crypto library, and it comes out wrong when I try to insert it into the database. Buffers should be left in binary format.

Leaking Client objects?

Trying to track down a memory leak in our app, minimal test case boiled down to this:

var heapdump = require("heapdump");

var mariasql = require('mariasql');

function test() {

    var db = new mariasql();

    db.end();
}

for (var i = 0; i < 100; i++) {
    test();
}

setTimeout(function() {
    heapdump.writeSnapshot();
}, 5000);

Inspecting the heapdump shows 100 Client objects still on the heap. I don't see why they aren't cleaned up by the GC.

Memory leak

I've been hunting for a memory leak in app that I'm developing and narrowed the cause to mariasql-module.

I attached https://github.com/lloyd/node-memwatch module to a simple sample script and saved current_base information from GC emitted stats-event and ran the same example with mariasql compared to felxge-mysql -module (https://github.com/felixge/node-mysql)

Here's the script that I used to test mariasql:
maria.js

"use strict";

var restify = require('restify');

var mariasql = require('mariasql');
var config = require('./app/config');

var memwatch = require('memwatch');
var fs = require('fs');

memwatch.on('leak', function(info) {
    console.log('memwatch leak!!');
    console.log(info);
});

memwatch.on('stats', function(stats) {
    console.log(stats);

    var test = stats.current_base + "\t" + stats.usage_trend+"\n";
    fs.appendFileSync(__dirname+'/logs/stats_mariasql.txt', test);
});

var server = restify.createServer();

// Database config file
var cfg = {
    host: config.dbHost,
    user: config.dbUser,
    password: config.dbPassword,
    database: config.dbName,
    port: config.dbPort,
    unixSocket: '/var/run/mysqld/mysqld.sock',
    log: false,
    maxPool: 100,
    minPool: 1,
    idleTimeoutMillis : 30000,
    keepQueries: true
};

server.get('/test', function(req, res, next) {
    var results = {
        info : {},
        data : []
    }

    var query = 'SELECT * FROM users WHERE UID = :UID';

    var values = { UID: 13 };

    var c = new mariasql();

    c.connect({
        user: cfg.user,
        password: cfg.password,
        unixSocket: cfg.unixSocket,
        db: cfg.database
    });

    c.on('connect', function() {
        var pq = c.prepare(query);

        c.query(pq(values))
        .on('result', function(r) {
            r.on('row', function(row) {
                results.data.push(row);
            }).on('error', function(qerror) {
                results.error = qerror;
                console.log("\nSQL QUERY ERROR : " + qerror + "\n\nSQL:\n" + query + "\nVALUES:\n" + JSON.stringify(values)+"\n");
            }).on('abort', function() {
                 console.log('query aborted');
            }).on('end', function(info) {
                results.info = info;
            });
        })
        .on('end', function() {
            c.end();

            res.send(results);
            next();
        });

    })
    .on('error', function(err) {
        console.log('Client error: ' + err);
    })
    .on('close', function(hadError) {
        if (hadError) {
            console.log('mariasql close error: ' + hadError);
        }
    });

});

// Listen on port 8000, IP defaults to 127.0.0.1
server.listen(8000);

// Put a friendly message on the terminal
console.log("Server running at http://127.0.0.1:8000/");

And here's the equivalent script with node-mysql:
mysql.js

"use strict";

var restify = require('restify');

var mysql = require('mysql');
var config = require('./app/config');

var memwatch = require('memwatch');
var fs = require('fs');

memwatch.on('leak', function(info) {
    console.log('memwatch leak!!');
    console.log(info);
});

memwatch.on('stats', function(stats) {
    console.log(stats);

    var test = stats.current_base + "\t" + stats.usage_trend+"\n";
    fs.appendFileSync(__dirname+'/logs/stats_mysql.txt', test);
});

var server = restify.createServer();

// Database config file
var cfg = {
    host: config.dbHost,
    user: config.dbUser,
    password: config.dbPassword,
    database: config.dbName,
    port: config.dbPort,
    unixSocket: '/var/run/mysqld/mysqld.sock',
    log: false,
    maxPool: 100,
    minPool: 1,
    idleTimeoutMillis : 30000,
    keepQueries: true
};

server.get('/test', function(req, res, next) {
    var results = {
        info : {},
        data : []
    }
    var query = 'SELECT * FROM users WHERE UID = :UID';
    var values = { UID: 13 };

    var c = mysql.createConnection({
        user: cfg.user,
        supportBigNumbers: true,
        password: cfg.password,
        socketPath: cfg.unixSocket,
        database: cfg.database
    });

    c.config.queryFormat = function (query, values) {
      if (!values) return query;
      return query.replace(/\:(\w+)/g, function (txt, key) {
        if (values.hasOwnProperty(key)) {
          return this.escape(values[key]);
        }
        return txt;
      }.bind(this));
    };

    c.connect(function(err) {

      c.query(query, values, function(err, data) {
          if (err) {
              console.log(err);
              results.error = err;
          }
          else {
              // These are here just to make mysql -module a drop-in replacement for mariasql -module
              results.info.insertId = data.insertId || 0;
              results.info.affectedRows = (data.affectedRows ? data.affectedRows : 0);
              results.info.numRows = (!data.insertId ? data.length : 0);
          }

          results.data = data;

          res.send(results);
          next();

          c.end();

      });

    });

});

// Listen on port 8000, IP defaults to 127.0.0.1
server.listen(8000);

// Put a friendly message on the terminal
console.log("Server running at http://127.0.0.1:8000/");

Then I ran apache benchmark five times in a row for both maria.js and mysql.js with params: ab -c100 -n30000 localhost:8000/test

The results look like this when drawn a graph in spreadsheet:

mysql-maria-comparison


This looks really bad and it resembles the situation on our production server memory usage when using mariasql -module as mariadb adapter. So if I'm somehow misusing mariasql module that is causing this memory leak, please correct me. But as I can understand, this is for real. As soon as I start querying with mariasql module, the memory starts growing until system runs out of memory and server crashes.


Node version v0.10.26
Mariasql version v0.1.20
Felixge mysql version v2.2.0
MariaDB version v10.0.8
Running ubuntu 12.04LTS


I hope the cause for this memory leak can be found, it really is faster than the mysql -module. I don't have much experience with C/C++ addons but I'm pretty sure the reason for this memory leak bubbles from there.

-- Leo

Fails to build on x86 systems

On 32 bit based Unix OS systems the build seems to fail; if it now only supports 86_64 then not a problem, but thought I'd let you know.

make: Leaving directory /home/node/node_modules/mariasql/build' gyp ERR! build error gyp ERR! stack Error:makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_ modules/node-gyp/lib/build.js:255:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17) gyp ERR! stack at Process._handle.onexit (child_process.js:678:10) gyp ERR! System Linux 2.6.32-042stab072.10 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/b in/node-gyp.js" "rebuild" gyp ERR! cwd /home/node/node_modules/mariasql gyp ERR! node -v v0.8.18 gyp ERR! node-gyp -v v0.8.2 gyp ERR! not ok npm ERR! [email protected] install:node-gyp rebuild npm ERR!sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the mariasql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls mariasql
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-042stab072.10
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "mariasql"
npm ERR! cwd /home/node
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.2
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! not ok code 0

Question: How to set enable-local-infile?

Can't get this to work. I saw it as an option in the client.c file, but can't figure out how to set it from the script. Is there a flag, or some other option?

Thanks!

UPDATE:

Found this in MySQL documentation:
If you use LOAD DATA LOCAL in Perl scripts or other programs that read the [client] group from option files, you can add the local-infile=1 option to that group. However, to keep this from causing problems for programs that do not understand local-infile, specify it using the loose- prefix:

[client]
loose-local-infile=1

However it still didn't work which makes me think its a bug in the C client.

Confused by the usage of query()

in the document example:

var inspect = require('util').inspect;
var Client = require('mariasql');

var c = new Client();
c.connect({
  host: '127.0.0.1',
  user: 'foo',
  password: 'bar'
});

c.on('connect', function() {
   console.log('Client connected');
 })
 .on('error', function(err) {
   console.log('Client error: ' + err);
 })
 .on('close', function(hadError) {
   console.log('Client closed');
 });

c.query('SHOW DATABASES')
 .on('result', function(res) {
   res.on('row', function(row) {
     console.log('Result row: ' + inspect(row));
   })
   .on('error', function(err) {
     console.log('Result error: ' + inspect(err));
   })
   .on('end', function(info) {
     console.log('Result finished successfully');
   });
 })
 .on('end', function() {
   console.log('Done with all results');
 });

c.end();

I am quite confused by the place where the query( ) function is used.
Shouldn't the whole

c.query('SHOW DATABASES')
 .on('result', function(res) {
   res.on('row', function(row) {
     console.log('Result row: ' + inspect(row));
   })
   .on('error', function(err) {
     console.log('Result error: ' + inspect(err));
   })
   .on('end', function(info) {
     console.log('Result finished successfully');
   });
 })
 .on('end', function() {
   console.log('Done with all results');
 });

block be place in the callback function of query( ) ?
I thought nodejs functions run aschronously, and thus you cannot be sure the connection is successfully finished if you place the c.query() in parallel with c.on('connection',xxx).

Am I thought wrong somewhere? I don't know how to use the mariasql now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.