<commit_before>[Default]
Version = 8

Number of Inputs = 0

Sanitize Input Value Check = false
Sanitize Output Value Check = false 

Prepared Statement Cache = true

Return InsertID = false

Strip = true
Strip Chars Action = STRIP
Strip Chars = \/\|;{}<>\'
Strip Custom Chars = \/\|;{}<>\'


; --------------------------------------------------------------------------------
; DB INFO
; --------------------------------------------------------------------------------

[getDBVersion]
SQL1_1 = SELECT IFNULL ((SELECT Value FROM DBInfo WHERE Name = 'Version'), '2.0');

; --------------------------------------------------------------------------------
; SERVER INSTANCE & MAP
; --------------------------------------------------------------------------------

[checkServerInstance]
SQL1_1 = SELECT IF ((SELECT 1 FROM ServerInstance WHERE ID = ?), 'true', 'false');

Number of Inputs = 1
SQL1_INPUTS = 1

[insertServerInstance]
SQL1_1 = INSERT INTO ServerInstance SET ID = ?;

Number of Inputs = 1
SQL1_INPUTS = 1

[getServerMapID]
SQL1_1 = SELECT IFNULL ((SELECT ID FROM ServerMap WHERE WorldName = ? AND Environment = ?), 0);

Number of Inputs = 2
SQL1_INPUTS = 1,2

[insertServerMap]
SQL1_1 = INSERT INTO ServerMap SET WorldName = ?, Environment = ?;
SQL2_1 = SELECT LAST_INSERT_ID();

Number of Inputs = 2
SQL1_INPUTS = 1,2

; --------------------------------------------------------------------------------
; PLAYER SAVING
; --------------------------------------------------------------------------------

[checkPlayerSave]
SQL1_1 = SELECT IF ((SELECT 1 FROM PlayerSave WHERE PlayerUID = ? AND MapID = ?), 'true', 'false');

Number of Inputs = 2
SQL1_INPUTS = 1,2

[getPlayerSave]
SQL1_1 = SELECT $CUSTOM_1$ FROM PlayerSave WHERE PlayerUID = ? AND MapID = ?;

Number of Inputs = 2
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2

[getPlayerBankMoney]
SQL1_1 = SELECT BankMoney FROM PlayerInfo WHERE UID = ?;

Number of Inputs = 1
SQL1_INPUTS = 1

[insertOrUpdatePlayerInfo]
SQL1_1 = INSERT INTO PlayerInfo SET UID = ?, BattlEyeGUID = REPLACE(?, '"', ''), $CUSTOM_1$
SQL1_2 = ON DUPLICATE KEY UPDATE $CUSTOM_2$;

Number of Inputs = 1
Number of Custom Inputs = 2
SQL1_INPUTS = 1,1-STRING-BEGUID

[insertOrUpdatePlayerSave]
SQL1_1 = INSERT INTO PlayerSave SET PlayerUID = ?, MapID = ?, CreationDate = NOW(), $CUSTOM_1$
SQL1_2 = ON DUPLICATE KEY UPDATE $CUSTOM_2$;

Number of Inputs = 2
Number of Custom Inputs = 2
SQL1_INPUTS = 1,2

[deletePlayerSave]
SQL1_1 = DELETE FROM PlayerSave WHERE PlayerUID = ? AND MapID = ?;

Number of Inputs = 2
SQL1_INPUTS = 1,2

[insertOrUpdatePlayerStats]
SQL1_1 = INSERT INTO PlayerStats SET PlayerUID = ?, $CUSTOM_1$ = $CUSTOM_2$
SQL1_2 = ON DUPLICATE KEY UPDATE $CUSTOM_1$ = $CUSTOM_1$ + $CUSTOM_2$;
SQL2_1 = INSERT INTO PlayerStatsMap SET PlayerUID = ?, ServerID = ?, MapID = ?, $CUSTOM_1$ = $CUSTOM_2$
SQL2_2 = ON DUPLICATE KEY UPDATE $CUSTOM_1$ = $CUSTOM_1$ + $CUSTOM_2$;

Number of Inputs = 3
Number of Custom Inputs = 2
SQL1_INPUTS = 1
SQL2_INPUTS = 1,2,3

; --------------------------------------------------------------------------------
; WARCHEST
; --------------------------------------------------------------------------------

[getWarchestMoney]
SQL1_1 = SELECT WarchestMoneyBLUFOR, WarchestMoneyOPFOR FROM ServerInstance WHERE ID = ?;

Number of Inputs = 1
SQL1_INPUTS = 1

[updateWarchestMoney]
SQL1_1 = UPDATE ServerInstance SET WarchestMoneyBLUFOR = ?, WarchestMoneyOPFOR = ? WHERE ID = ?;

Number of Inputs = 3 
SQL1_INPUTS = 2,3,1

; --------------------------------------------------------------------------------
; OBJECT SAVING
; --------------------------------------------------------------------------------

[getServerObjects]
SQL1_1 = SELECT $CUSTOM_1$ FROM ServerObjects WHERE ServerID = ? AND MapID = ?;

Number of Inputs = 2
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2

[newServerObject]
SQL1_1 = INSERT INTO ServerObjects SET ServerID = ?, MapID = ?, CreationDate = NOW();
SQL2_1 = SELECT LAST_INSERT_ID();

Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateServerObject]
SQL1_1 = UPDATE ServerObjects SET $CUSTOM_1$ WHERE ID = ?;

Number of Inputs = 1
Number of Custom Inputs = 1
SQL1_INPUTS = 1

[deleteServerObjects]
SQL1_1 = DELETE FROM ServerObjects WHERE ID IN (?);

Number of Inputs = 1
SQL1_INPUTS = 1

[deleteExpiredServerObjects]
SQL1_1 = DELETE FROM ServerObjects WHERE ServerID = ? AND MapID = ?
SQL1_2 = 	AND ((? > 0 AND TIMESTAMPDIFF(HOUR, LastInteraction, NOW()) > ?)
SQL1_3 = 	     OR (? <= 0 AND Locked = 0 AND Deployable = 0)
SQL1_4 = 	     OR Damage >= 1);

Number of Inputs = 4
SQL1_INPUTS = 1,2,3,3,4

; --------------------------------------------------------------------------------
; VEHICLE SAVING
; --------------------------------------------------------------------------------

[getServerVehicles]
SQL1_1 = SELECT $CUSTOM_1$ FROM ServerVehicles WHERE ServerID = ? AND MapID = ?;

Number of Inputs = 2
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2

[newServerVehicle]
SQL1_1 = INSERT INTO ServerVehicles SET ServerID = ?, MapID = ?, CreationDate = NOW();
SQL2_1 = SELECT LAST_INSERT_ID();

Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateServerVehicle]
SQL1_1 = UPDATE ServerVehicles SET $CUSTOM_1$ WHERE ID = ?;

Number of Inputs = 1
Number of Custom Inputs = 1
SQL1_INPUTS = 1

[deleteServerVehicles]
SQL1_1 = DELETE FROM ServerVehicles WHERE ID IN (?);

Number of Inputs = 1
SQL1_INPUTS = 1

[deleteExpiredServerVehicles]
SQL1_1 = DELETE FROM ServerVehicles WHERE ServerID = ? AND MapID = ?
SQL1_2 = 	AND ((? > 0 AND TIMESTAMPDIFF(HOUR, CreationDate, NOW()) > ?)
SQL1_3 = 	     OR (? > 0 AND TIMESTAMPDIFF(HOUR, LastUsed, NOW()) > ?)
SQL1_4 = 	     OR Damage >= 0.99);<commit_msg>Disabled Caching some statements<commit_after>[Default]
Version = 8

Number of Inputs = 0

Sanitize Input Value Check = false
Sanitize Output Value Check = false 

Prepared Statement Cache = true

Return InsertID = false

Strip = true
Strip Chars Action = STRIP
Strip Chars = \/\|;{}<>\'
Strip Custom Chars = \/\|;{}<>\'


; --------------------------------------------------------------------------------
; DB INFO
; --------------------------------------------------------------------------------

[getDBVersion]
Prepared Statement Cache = false
SQL1_1 = SELECT IFNULL ((SELECT Value FROM DBInfo WHERE Name = 'Version'), '2.0');

; --------------------------------------------------------------------------------
; SERVER INSTANCE & MAP
; --------------------------------------------------------------------------------

[checkServerInstance]
Prepared Statement Cache = false
SQL1_1 = SELECT IF ((SELECT 1 FROM ServerInstance WHERE ID = ?), 'true', 'false');

Number of Inputs = 1
SQL1_INPUTS = 1

[insertServerInstance]
Prepared Statement Cache = false
SQL1_1 = INSERT INTO ServerInstance SET ID = ?;

Number of Inputs = 1
SQL1_INPUTS = 1

[getServerMapID]
Prepared Statement Cache = false
SQL1_1 = SELECT IFNULL ((SELECT ID FROM ServerMap WHERE WorldName = ? AND Environment = ?), 0);

Number of Inputs = 2
SQL1_INPUTS = 1,2

[insertServerMap]
Prepared Statement Cache = false
SQL1_1 = INSERT INTO ServerMap SET WorldName = ?, Environment = ?;
SQL2_1 = SELECT LAST_INSERT_ID();

Number of Inputs = 2
SQL1_INPUTS = 1,2

; --------------------------------------------------------------------------------
; PLAYER SAVING
; --------------------------------------------------------------------------------

[checkPlayerSave]
SQL1_1 = SELECT IF ((SELECT 1 FROM PlayerSave WHERE PlayerUID = ? AND MapID = ?), 'true', 'false');

Number of Inputs = 2
SQL1_INPUTS = 1,2

[getPlayerSave]
SQL1_1 = SELECT $CUSTOM_1$ FROM PlayerSave WHERE PlayerUID = ? AND MapID = ?;

Number of Inputs = 2
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2

[getPlayerBankMoney]
SQL1_1 = SELECT BankMoney FROM PlayerInfo WHERE UID = ?;

Number of Inputs = 1
SQL1_INPUTS = 1

[insertOrUpdatePlayerInfo]
SQL1_1 = INSERT INTO PlayerInfo SET UID = ?, BattlEyeGUID = REPLACE(?, '"', ''), $CUSTOM_1$
SQL1_2 = ON DUPLICATE KEY UPDATE $CUSTOM_2$;

Number of Inputs = 1
Number of Custom Inputs = 2
SQL1_INPUTS = 1,1-STRING-BEGUID

[insertOrUpdatePlayerSave]
SQL1_1 = INSERT INTO PlayerSave SET PlayerUID = ?, MapID = ?, CreationDate = NOW(), $CUSTOM_1$
SQL1_2 = ON DUPLICATE KEY UPDATE $CUSTOM_2$;

Number of Inputs = 2
Number of Custom Inputs = 2
SQL1_INPUTS = 1,2

[deletePlayerSave]
SQL1_1 = DELETE FROM PlayerSave WHERE PlayerUID = ? AND MapID = ?;

Number of Inputs = 2
SQL1_INPUTS = 1,2

[insertOrUpdatePlayerStats]
SQL1_1 = INSERT INTO PlayerStats SET PlayerUID = ?, $CUSTOM_1$ = $CUSTOM_2$
SQL1_2 = ON DUPLICATE KEY UPDATE $CUSTOM_1$ = $CUSTOM_1$ + $CUSTOM_2$;
SQL2_1 = INSERT INTO PlayerStatsMap SET PlayerUID = ?, ServerID = ?, MapID = ?, $CUSTOM_1$ = $CUSTOM_2$
SQL2_2 = ON DUPLICATE KEY UPDATE $CUSTOM_1$ = $CUSTOM_1$ + $CUSTOM_2$;

Number of Inputs = 3
Number of Custom Inputs = 2
SQL1_INPUTS = 1
SQL2_INPUTS = 1,2,3

; --------------------------------------------------------------------------------
; WARCHEST
; --------------------------------------------------------------------------------

[getWarchestMoney]
Prepared Statement Cache = false
SQL1_1 = SELECT WarchestMoneyBLUFOR, WarchestMoneyOPFOR FROM ServerInstance WHERE ID = ?;

Number of Inputs = 1
SQL1_INPUTS = 1

[updateWarchestMoney]
SQL1_1 = UPDATE ServerInstance SET WarchestMoneyBLUFOR = ?, WarchestMoneyOPFOR = ? WHERE ID = ?;

Number of Inputs = 3 
SQL1_INPUTS = 2,3,1

; --------------------------------------------------------------------------------
; OBJECT SAVING
; --------------------------------------------------------------------------------

[getServerObjects]
Prepared Statement Cache = false
SQL1_1 = SELECT $CUSTOM_1$ FROM ServerObjects WHERE ServerID = ? AND MapID = ?;

Number of Inputs = 2
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2

[newServerObject]
SQL1_1 = INSERT INTO ServerObjects SET ServerID = ?, MapID = ?, CreationDate = NOW();
SQL2_1 = SELECT LAST_INSERT_ID();

Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateServerObject]
SQL1_1 = UPDATE ServerObjects SET $CUSTOM_1$ WHERE ID = ?;

Number of Inputs = 1
Number of Custom Inputs = 1
SQL1_INPUTS = 1

[deleteServerObjects]
SQL1_1 = DELETE FROM ServerObjects WHERE ID IN (?);

Number of Inputs = 1
SQL1_INPUTS = 1

[deleteExpiredServerObjects]
Prepared Statement Cache = false
SQL1_1 = DELETE FROM ServerObjects WHERE ServerID = ? AND MapID = ?
SQL1_2 = 	AND ((? > 0 AND TIMESTAMPDIFF(HOUR, LastInteraction, NOW()) > ?)
SQL1_3 = 	     OR (? <= 0 AND Locked = 0 AND Deployable = 0)
SQL1_4 = 	     OR Damage >= 1);

Number of Inputs = 4
SQL1_INPUTS = 1,2,3,3,4

; --------------------------------------------------------------------------------
; VEHICLE SAVING
; --------------------------------------------------------------------------------

[getServerVehicles]
Prepared Statement Cache = false
SQL1_1 = SELECT $CUSTOM_1$ FROM ServerVehicles WHERE ServerID = ? AND MapID = ?;

Number of Inputs = 2
Number of Custom Inputs = 1
SQL1_INPUTS = 1,2

[newServerVehicle]
SQL1_1 = INSERT INTO ServerVehicles SET ServerID = ?, MapID = ?, CreationDate = NOW();
SQL2_1 = SELECT LAST_INSERT_ID();

Number of Inputs = 2
SQL1_INPUTS = 1,2

[updateServerVehicle]
SQL1_1 = UPDATE ServerVehicles SET $CUSTOM_1$ WHERE ID = ?;

Number of Inputs = 1
Number of Custom Inputs = 1
SQL1_INPUTS = 1

[deleteServerVehicles]
SQL1_1 = DELETE FROM ServerVehicles WHERE ID IN (?);

Number of Inputs = 1
SQL1_INPUTS = 1

[deleteExpiredServerVehicles]
Prepared Statement Cache = false
SQL1_1 = DELETE FROM ServerVehicles WHERE ServerID = ? AND MapID = ?
SQL1_2 = 	AND ((? > 0 AND TIMESTAMPDIFF(HOUR, CreationDate, NOW()) > ?)
SQL1_3 = 	     OR (? > 0 AND TIMESTAMPDIFF(HOUR, LastUsed, NOW()) > ?)
SQL1_4 = 	     OR Damage >= 0.99);
{'fraction_non_alphanumeric': 0.25049157903736, 'fraction_numerical': 0.035393690689920494, 'mean_word_length': 2.1378755364806867, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '211036', 'n_tokens_mistral': 3959, 'n_tokens_neox': 3678, 'n_words': 1116}