package model

const (
	mysql_configuration_save = `INSERT INTO configurations (name,
		pwd,
		admin_pwd,
		pickup_mode,
		lock_entry_list,
		race_overtime,
		max_slots,
		welcome,
		description,
		udp,
		tcp,
		http,
		packets_hz,
		loop_mode,
		show_in_lobby,
		threads,
		auth_plugin_address,
		abs,
		tc,
		stability_aid,
		auto_clutch,
		tyre_blankets,
		force_virtual_mirror,
		fuel_rate,
		damage_rate,
		tires_wear_rate,
		allowed_tires_out,
		max_ballast,
		start_rule,
		disable_gas_cut_penality,
		time_of_day_mult,
		result_screen_time,
		dynamic_track,
		track_condition,
		start_value,
		randomness,
		transferred_grip,
		laps_to_improve_grip,
		kick_vote_quorum,
		session_vote_quorum,
		vote_duration,
		blacklist,
		max_collisions_km,
		booking,
		booking_time,
		practice,
		practice_time,
		can_join_practice,
		qualify,
		qualify_time,
		can_join_qualify,
		race,
		race_laps,
		race_time,
		race_wait_time,
		race_extra_lap,
		join_type,
		sun_angle,
		track,
		track_config,
		legal_tyres,
		udp_plugin_local_port,
		udp_plugin_address,
		race_pit_window_start,
		race_pit_window_end,
		reversed_grid_race_positions,
		server_cfg_ini,
		entry_list_ini
		) VALUES (
		:name,
		:pwd,
		:admin_pwd,
		:pickup_mode,
		:lock_entry_list,
		:race_overtime,
		:max_slots,
		:welcome,
		:description,
		:udp,
		:tcp,
		:http,
		:packets_hz,
		:loop_mode,
		:show_in_lobby,
		:threads,
		:auth_plugin_address,
		:abs,
		:tc,
		:stability_aid,
		:auto_clutch,
		:tyre_blankets,
		:force_virtual_mirror,
		:fuel_rate,
		:damage_rate,
		:tires_wear_rate,
		:allowed_tires_out,
		:max_ballast,
		:start_rule,
		:disable_gas_cut_penality,
		:time_of_day_mult,
		:result_screen_time,
		:dynamic_track,
		:track_condition,
		:start_value,
		:randomness,
		:transferred_grip,
		:laps_to_improve_grip,
		:kick_vote_quorum,
		:session_vote_quorum,
		:vote_duration,
		:blacklist,
		:max_collisions_km,
		:booking,
		:booking_time,
		:practice,
		:practice_time,
		:can_join_practice,
		:qualify,
		:qualify_time,
		:can_join_qualify,
		:race,
		:race_laps,
		:race_time,
		:race_wait_time,
		:race_extra_lap,
		:join_type,
		:sun_angle,
		:track,
		:track_config,
		:legal_tyres,
		:udp_plugin_local_port,
		:udp_plugin_address,
		:race_pit_window_start,
		:race_pit_window_end,
		:reversed_grid_race_positions,
		:server_cfg_ini,
		:entry_list_ini)`
	mysql_configuration_update = `UPDATE configurations SET name = :name,
		pwd = :pwd,
		admin_pwd = :admin_pwd,
		pickup_mode = :pickup_mode,
		lock_entry_list = :lock_entry_list,
		race_overtime = :race_overtime,
		max_slots = :max_slots,
		welcome = :welcome,
		description = :description,
		udp = :udp,
		tcp = :tcp,
		http = :http,
		packets_hz = :packets_hz,
		loop_mode = :loop_mode,
		show_in_lobby = :show_in_lobby,
		threads = :threads,
		auth_plugin_address = :auth_plugin_address,
		abs = :abs,
		tc = :tc,
		stability_aid = :stability_aid,
		auto_clutch = :auto_clutch,
		tyre_blankets = :tyre_blankets,
		force_virtual_mirror = :force_virtual_mirror,
		fuel_rate = :fuel_rate,
		damage_rate = :damage_rate,
		tires_wear_rate = :tires_wear_rate,
		allowed_tires_out = :allowed_tires_out,
		max_ballast = :max_ballast,
		start_rule = :start_rule,
		disable_gas_cut_penality = :disable_gas_cut_penality,
		time_of_day_mult = :time_of_day_mult,
		result_screen_time = :result_screen_time,
		dynamic_track = :dynamic_track,
		track_condition = :track_condition,
		start_value = :start_value,
		randomness = :randomness,
		transferred_grip = :transferred_grip,
		laps_to_improve_grip = :laps_to_improve_grip,
		kick_vote_quorum = :kick_vote_quorum,
		session_vote_quorum = :session_vote_quorum,
		vote_duration = :vote_duration,
		blacklist = :blacklist,
		max_collisions_km = :max_collisions_km,
		booking = :booking,
		booking_time = :booking_time,
		practice = :practice,
		practice_time = :practice_time,
		can_join_practice = :can_join_practice,
		qualify = :qualify,
		qualify_time = :qualify_time,
		can_join_qualify = :can_join_qualify,
		race = :race,
		race_laps = :race_laps,
		race_time = :race_time,
		race_wait_time = :race_wait_time,
		race_extra_lap = :race_extra_lap,
		join_type = :join_type,
		sun_angle = :sun_angle,
		track = :track,
		track_config = :track_config,
		legal_tyres = :legal_tyres,
		udp_plugin_local_port = :udp_plugin_local_port,
		udp_plugin_address = :udp_plugin_address,
		race_pit_window_start = :race_pit_window_start,
		race_pit_window_end = :race_pit_window_end,
		reversed_grid_race_positions = :reversed_grid_race_positions,
		server_cfg_ini = :server_cfg_ini,
		entry_list_ini = :entry_list_ini
		WHERE id = :id`
	mysql_weather_save = `INSERT INTO weather (configuration,
		weather,
		base_ambient_temp,
		base_road_temp,
		ambient_variation,
		road_variation,
		wind_base_speed_min,
		wind_base_speed_max,
		wind_base_direction,
		wind_variation_direction
		) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
	mysql_weather_update = `UPDATE weather SET weather = ?,
		base_ambient_temp = ?,
		base_road_temp = ?,
		ambient_variation = ?,
		road_variation = ?,
		wind_base_speed_min = ?,
		wind_base_speed_max = ?,
		wind_base_direction = ?,
		wind_variation_direction = ?
		WHERE id = ?`
	mysql_cars_save = `INSERT INTO cars (configuration,
		car,
		painting,
		spectator,
		driver,
		team,
		guid,
		position,
		fixed_setup,
		ballast,
		restrictor
		) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
	mysql_cars_update = `UPDATE cars SET car = ?,
		painting = ?,
		spectator = ?,
		driver = ?,
		team = ?,
		guid = ?,
		position = ?,
		fixed_setup = ?,
		ballast = ?,
		restrictor = ? WHERE id = ?`
	mysql_weather_delete_configuration = "DELETE FROM weather WHERE configuration = :id"
	mysql_cars_delete_configuration    = "DELETE FROM cars WHERE configuration = :id"
	mysql_configuration_delete         = "DELETE FROM configurations WHERE id = :id"
	mysql_weather_delete               = "DELETE FROM weather WHERE id = :id"
	mysql_cars_delete                  = "DELETE FROM cars WHERE id = :id"
	mysql_weather_get_configuration    = "SELECT * FROM weather WHERE configuration = ?"
	mysql_cars_get_configuration       = "SELECT * FROM cars WHERE configuration = ? ORDER BY position ASC"
	mysql_configuration_get_all        = "SELECT * FROM configurations ORDER BY name ASC"
	mysql_configuration_get_id         = "SELECT * FROM configurations WHERE id = ?"

	postgres_configuration_save = `INSERT INTO "configurations" (name,
		pwd,
		admin_pwd,
		pickup_mode,
		lock_entry_list,
		race_overtime,
		max_slots,
		welcome,
		description,
		udp,
		tcp,
		http,
		packets_hz,
		loop_mode,
		show_in_lobby,
		threads,
		auth_plugin_address,
		abs,
		tc,
		stability_aid,
		auto_clutch,
		tyre_blankets,
		force_virtual_mirror,
		fuel_rate,
		damage_rate,
		tires_wear_rate,
		allowed_tires_out,
		max_ballast,
		start_rule,
		disable_gas_cut_penality,
		time_of_day_mult,
		result_screen_time,
		dynamic_track,
		track_condition,
		start_value,
		randomness,
		transferred_grip,
		laps_to_improve_grip,
		kick_vote_quorum,
		session_vote_quorum,
		vote_duration,
		blacklist,
		max_collisions_km,
		booking,
		booking_time,
		practice,
		practice_time,
		can_join_practice,
		qualify,
		qualify_time,
		can_join_qualify,
		race,
		race_laps,
		race_time,
		race_wait_time,
		race_extra_lap,
		join_type,
		sun_angle,
		track,
		track_config,
		legal_tyres,
		udp_plugin_local_port,
		udp_plugin_address,
		race_pit_window_start,
		race_pit_window_end,
		reversed_grid_race_positions,
		server_cfg_ini,
		entry_list_ini
		) VALUES (
		:name,
		:pwd,
		:admin_pwd,
		:pickup_mode,
		:lock_entry_list,
		:race_overtime,
		:max_slots,
		:welcome,
		:description,
		:udp,
		:tcp,
		:http,
		:packets_hz,
		:loop_mode,
		:show_in_lobby,
		:threads,
		:auth_plugin_address,
		:abs,
		:tc,
		:stability_aid,
		:auto_clutch,
		:tyre_blankets,
		:force_virtual_mirror,
		:fuel_rate,
		:damage_rate,
		:tires_wear_rate,
		:allowed_tires_out,
		:max_ballast,
		:start_rule,
		:disable_gas_cut_penality,
		:time_of_day_mult,
		:result_screen_time,
		:dynamic_track,
		:track_condition,
		:start_value,
		:randomness,
		:transferred_grip,
		:laps_to_improve_grip,
		:kick_vote_quorum,
		:session_vote_quorum,
		:vote_duration,
		:blacklist,
		:max_collisions_km,
		:booking,
		:booking_time,
		:practice,
		:practice_time,
		:can_join_practice,
		:qualify,
		:qualify_time,
		:can_join_qualify,
		:race,
		:race_laps,
		:race_time,
		:race_wait_time,
		:race_extra_lap,
		:join_type,
		:sun_angle,
		:track,
		:track_config,
		:legal_tyres,
		:udp_plugin_local_port,
		:udp_plugin_address,
		:race_pit_window_start,
		:race_pit_window_end,
		:reversed_grid_race_positions,
		:server_cfg_ini,
		:entry_list_ini) RETURNING id`
	postgres_configuration_update = `UPDATE configurations SET name = :name,
		pwd = :pwd,
		admin_pwd = :admin_pwd,
		pickup_mode = :pickup_mode,
		lock_entry_list = :lock_entry_list,
		race_overtime = :race_overtime,
		max_slots = :max_slots,
		welcome = :welcome,
		description = :description,
		udp = :udp,
		tcp = :tcp,
		http = :http,
		packets_hz = :packets_hz,
		loop_mode = :loop_mode,
		show_in_lobby = :show_in_lobby,
		threads = :threads,
		auth_plugin_address = :auth_plugin_address,
		abs = :abs,
		tc = :tc,
		stability_aid = :stability_aid,
		auto_clutch = :auto_clutch,
		tyre_blankets = :tyre_blankets,
		force_virtual_mirror = :force_virtual_mirror,
		fuel_rate = :fuel_rate,
		damage_rate = :damage_rate,
		tires_wear_rate = :tires_wear_rate,
		allowed_tires_out = :allowed_tires_out,
		max_ballast = :max_ballast,
		start_rule = :start_rule,
		disable_gas_cut_penality = :disable_gas_cut_penality,
		time_of_day_mult = :time_of_day_mult,
		result_screen_time = :result_screen_time,
		dynamic_track = :dynamic_track,
		track_condition = :track_condition,
		start_value = :start_value,
		randomness = :randomness,
		transferred_grip = :transferred_grip,
		laps_to_improve_grip = :laps_to_improve_grip,
		kick_vote_quorum = :kick_vote_quorum,
		session_vote_quorum = :session_vote_quorum,
		vote_duration = :vote_duration,
		blacklist = :blacklist,
		max_collisions_km = :max_collisions_km,
		booking = :booking,
		booking_time = :booking_time,
		practice = :practice,
		practice_time = :practice_time,
		can_join_practice = :can_join_practice,
		qualify = :qualify,
		qualify_time = :qualify_time,
		can_join_qualify = :can_join_qualify,
		race = :race,
		race_laps = :race_laps,
		race_time = :race_time,
		race_wait_time = :race_wait_time,
		race_extra_lap = :race_extra_lap,
		join_type = :join_type,
		sun_angle = :sun_angle,
		track = :track,
		track_config = :track_config,
		legal_tyres = :legal_tyres,
		udp_plugin_local_port = :udp_plugin_local_port,
		udp_plugin_address = :udp_plugin_address,
		race_pit_window_start = :race_pit_window_start,
		race_pit_window_end = :race_pit_window_end,
		reversed_grid_race_positions = :reversed_grid_race_positions,
		server_cfg_ini = :server_cfg_ini,
		entry_list_ini = :entry_list_ini
		WHERE id = :id`
	postgres_weather_save = `INSERT INTO "weather" (configuration,
		weather,
		base_ambient_temp,
		base_road_temp,
		ambient_variation,
		road_variation,
		wind_base_speed_min,
		wind_base_speed_max,
		wind_base_direction,
		wind_variation_direction
		) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)`
	postgres_weather_update = `UPDATE "weather" SET weather = $1,
		base_ambient_temp = $2,
		base_road_temp = $3,
		ambient_variation = $4,
		road_variation = $5,
		wind_base_speed_min = $6,
		wind_base_speed_max = $7,
		wind_base_direction = $8,
		wind_variation_direction = $9
		WHERE id = $10`
	postgres_cars_save = `INSERT INTO "cars" (configuration,
		car,
		painting,
		spectator,
		driver,
		team,
		guid,
		position,
		fixed_setup,
		ballast,
		restrictor
		) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)`
	postgres_cars_update = `UPDATE "cars" SET car = $1,
		painting = $2,
		spectator = $3,
		driver = $4,
		team = $5,
		guid = $6,
		position = $7,
		fixed_setup = $8,
		ballast = $10,
		restrictor = $11 WHERE id = $9`
	postgres_weather_delete_configuration = "DELETE FROM \"weather\" WHERE configuration = :id"
	postgres_cars_delete_configuration    = "DELETE FROM \"cars\" WHERE configuration = :id"
	postgres_configuration_delete         = "DELETE FROM \"configurations\" WHERE id = :id"
	postgres_weather_delete               = "DELETE FROM \"weather\" WHERE id = :id"
	postgres_cars_delete                  = "DELETE FROM \"cars\" WHERE id = :id"
	postgres_weather_get_configuration    = "SELECT * FROM \"weather\" WHERE configuration = $1"
	postgres_cars_get_configuration       = "SELECT * FROM \"cars\" WHERE configuration = $1 ORDER BY position ASC"
	postgres_configuration_get_all        = "SELECT * FROM \"configurations\" ORDER BY name ASC"
	postgres_configuration_get_id         = "SELECT * FROM \"configurations\" WHERE id = $1"
)
