Company•September 19, 2017
New Features in the DataStax Node.js Drivers
const client = new Client({
contactPoints,
policies: {
speculativeExecution: new ConstantSpeculativeExecutionPolicy(
200, // delay before a new execution is launched
2) // maximum amount of additional executions
}
});
const query = 'SELECT * FROM users WHERE key = ?';
client.execute(query, [ 'usr1' ], { prepare: true, isIdempotent: true });
const client = new Client({
contactPoints,
prepareOnAllHosts: false,
rePrepareOnUp: false
});
console.log('Pool state: %s', client.getState());