mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
fix: performance tweaks
Moved getConnection and ScheduleResourceTick above the try block. Moved connection.release into the finally block Increased default connection timeout to 1 minute.
This commit is contained in:
1 parent
87a5123117
commit
45b90c4ad3
4 files changed
+19
-12
No files matched your search
+7
-1
@@ -22,8 +22,14 @@ const dbOptions = (() => {
|
||||
return connectionInfo;
|
||||
}, {});
|
||||
|
||||
options.namedPlaceholders = true;
|
||||
options.typeCast = parseTypes;
|
||||
options.namedPlaceholders = true;
|
||||
|
||||
// increase the default timeout for slow servers
|
||||
options.connectTimeout = options.connectTimeout || 60000;
|
||||
|
||||
// disabled to prevent SQL injection
|
||||
options.multipleStatements = options.multipleStatements || false;
|
||||
|
||||
return options;
|
||||
})();
|
||||
|
||||
Reference in new issue
Block a user