Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(@inject("ICassandraConfig") private config: ICassandraConfig) {
let authProvider: auth.AuthProvider;
if (config.username && config.password) {
authProvider = new auth.PlainTextAuthProvider(config.username, config.password);
}
this.client = new Client(assign({
contactPoints: config.hosts,
keyspace: config.keyspace,
authProvider: authProvider
}, config.driverOptions || {}));
this.wrappedExecute = Observable.fromNodeCallback(this.client.execute, this.client);
this.wrappedEachRow = Observable.fromNodeCallback(this.client.eachRow, this.client);
}