jeefo-mysql
Advanced tools
Comparing version 0.0.46 to 0.0.47
17
index.js
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. | ||
* File Name : index.js | ||
* Created at : 2021-10-09 | ||
* Updated at : 2022-02-04 | ||
* Updated at : 2022-03-12 | ||
* Author : jeefo | ||
@@ -289,10 +289,11 @@ * Purpose : | ||
function get_connection(table_name, config = default_config) { | ||
if (named_instances.has(table_name)) { | ||
return named_instances.get(table_name); | ||
} | ||
function get_connection(table_name, config) { | ||
config = {...default_config, ...config}; | ||
if (named_instances.has(table_name)) { | ||
return named_instances.get(table_name); | ||
} | ||
const instance = new JeefoMySQLConnection(table_name, config); | ||
named_instances.set(table_name, instance); | ||
return instance; | ||
const instance = new JeefoMySQLConnection(table_name, config); | ||
named_instances.set(table_name, instance); | ||
return instance; | ||
} | ||
@@ -299,0 +300,0 @@ |
{ | ||
"name": "jeefo-mysql", | ||
"version": "0.0.46", | ||
"version": "0.0.47", | ||
"description": "Very simple MySQL connection instances for each table. I had annoyed enough for MySQL Deadlocks.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
17167
487