tweak(config): accept a JSON array for mysql_debug

This commit is contained in:
Linden committed 2022-08-12 18:54:32 +10:00
1 parent 211d678b8d
commit fca0b66fc8
1 file changed
+8 -1
+8 -1
View File
@@ -1,8 +1,15 @@
export const resourceName = GetCurrentResourceName();
export const mysql_debug = GetConvar('mysql_debug', 'false') === 'true';
export const mysql_ui = GetConvar('mysql_ui', 'false') === 'true';
export const mysql_slow_query_warning = GetConvarInt('mysql_slow_query_warning', 200);
export const mysql_connection_string = GetConvar('mysql_connection_string', '');
export let mysql_debug: boolean | string[];
try {
const debug = GetConvar('mysql_debug', 'false');
mysql_debug = debug === 'false' ? false : JSON.parse(debug);
} catch (e) {
mysql_debug = true;
}
export const mysql_transaction_isolation_level = (() => {
const query = 'SET TRANSACTION ISOLATION LEVEL';