mysqljs/mysql

pool cluster's on is not exist.

Open

#1.161 geöffnet am 28. Juli 2015

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.502 Forks)batch import
help wanted

Repository-Metriken

Stars
 (18.137 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

i'm trying pool cluster of mysql module.

below is my stub code.

and i created pool cluster, and get pool using of('namespace');

but there are wpool's on function is not exist ( ERROR )

how can is use this?

var wpool = poolCluster.of('MASTER-01', 'ORDER');//RANDOM, 
var rpool = poolCluster.of('SLAVE-*', 'ORDER');

wpool.on('connection', function (connection) {
    connection.query('USE muscat'); 
    connection.query('SET SESSION auto_increment_increment=1');
    queryFormat(connection);
});
wpool.on('connection', function (connection) {
      ^
TypeError: undefined is not a function
    at Object.<anonymous> (/Users/breaklee/Documents/project/eazler/muscat/database/mysql.js:32:7)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/breaklee/Documents/project/eazler/muscat/database/index.js:4:12)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

Contributor Guide