2013-01-18 34 views
5

Jak ustawić limit czasu dla zapytania mysql w pliku node.js?Node.js - timeout zapytania mysql

/*...*/ 

var mysql = require("mysql"); 

/* ...*/ 

app.get("/", function(req, res) { 
    connection.query("SELECT ...", function(err, rows, fields) { 
/* I want this query to fail if the ^_ callback is not invoked within x seconds */ 

    }); 
} 

Odpowiedz