mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +00:00
tweak(config): accept a JSON array for mysql_debug
This commit is contained in:
1 parent
211d678b8d
commit
fca0b66fc8
1 file changed
+8
-1
+8
-1
@@ -1,8 +1,15 @@
|
|||||||
export const resourceName = GetCurrentResourceName();
|
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_ui = GetConvar('mysql_ui', 'false') === 'true';
|
||||||
export const mysql_slow_query_warning = GetConvarInt('mysql_slow_query_warning', 200);
|
export const mysql_slow_query_warning = GetConvarInt('mysql_slow_query_warning', 200);
|
||||||
export const mysql_connection_string = GetConvar('mysql_connection_string', '');
|
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 = (() => {
|
export const mysql_transaction_isolation_level = (() => {
|
||||||
const query = 'SET TRANSACTION ISOLATION LEVEL';
|
const query = 'SET TRANSACTION ISOLATION LEVEL';
|
||||||
|
|||||||
Reference in new issue
Block a user