fixed bug in ssl

This commit is contained in:
Sam 2025-04-13 15:25:02 +02:00
parent 5c6091286a
commit c545ce5bd1

View File

@ -48,7 +48,7 @@ class awSQL {
const identifier = options.customIdentifier||`${username}@${hostname}`; // Set identifier to given identifier or [username]@[hostname]
// If an instance with that identifier exists, throw error
if (this.#instances[identifier]) throw new Error(`Can't create new instance with identifier "${identifier}": An instance with the same name already exists`);
const instance = new Instance(hostname, username, password, options.charset, options.defaultDatabase, options.multipleStatements, options.insecureAuth);
const instance = new Instance(hostname, username, password, options.charset, options.defaultDatabase, options.multipleStatements, options.insecureAuth, options.ssl);
this.#instances[identifier] = instance; // Store instance
if (options.createAsDefault) this.#default = identifier; // If this instance was created with default option set it as the default instance
return instance;