feat: add support for plain-text auth for Cassandra

This commit is contained in:
nyaaao
2025-03-04 16:58:05 +02:00
parent 2a59faec17
commit fbbcc1172d

View File

@@ -44,9 +44,17 @@ const driver = {
analyserClass: Analyser,
// creating connection
async connect({ server, user, password, database, localDataCenter, useDatabaseUrl, databaseUrl }) {
let credentials;
if (user && password) {
credentials = {
username: user,
password,
}
}
const client = new cassandra.Client({
// user,
// password,
credentials,
contactPoints: server.split(','),
localDataCenter: localDataCenter ?? this.defaultLocalDataCenter,
keyspace: database,