The Battle for Wesnoth  1.15.3+dev
Macros | Functions | Variables
statement.cpp File Reference
#include <mysql.h>
#include <memory.h>
#include <mariadb++/connection.hpp>
#include <mariadb++/result_set.hpp>
#include <mariadb++/statement.hpp>
#include <mariadb++/bind.hpp>
#include "private.hpp"
Include dependency graph for statement.cpp:

Go to the source code of this file.

Macros

#define STMT_ERROR_RETURN_RS(statement)
 

Functions

 if (!value) return
 
value seekg (0, std::ios_base::end)
 
value seekg (0)
 
value read (bind.buffer(), bind.length())
 
bind set (MYSQL_TYPE_BLOB, value->get(), value->size())
 
bind set (MYSQL_TYPE_DATETIME)
 
bind set (MYSQL_TYPE_DATE)
 
bind set (MYSQL_TYPE_TIME)
 
bind set (MYSQL_TYPE_STRING, str.c_str(), str.size())
 
bind set (MYSQL_TYPE_STRING, value.c_str(), value.size())
 
bind set (MYSQL_TYPE_TINY)
 
bind set (MYSQL_TYPE_TINY, nullptr, 0, true)
 
bind set (MYSQL_TYPE_SHORT, nullptr, 0, true)
 
bind set (MYSQL_TYPE_SHORT)
 
bind set (MYSQL_TYPE_LONG, nullptr, 0, true)
 
bind set (MYSQL_TYPE_LONG)
 
bind set (MYSQL_TYPE_LONGLONG, nullptr, 0, true)
 
bind set (MYSQL_TYPE_LONGLONG)
 
bind set (MYSQL_TYPE_FLOAT)
 
bind set (MYSQL_TYPE_DOUBLE)
 

Variables

u64 size = value->tellg()
 
bind set (MYSQL_TYPE_BLOB, nullptr, static_cast< long unsigned int >(size))
 
bind m_time = value.mysql_time()
 
std::string str = value.str()
 
bind m_unsigned64 = value
 
bind m_signed64 = value
 
bind m_float32 [0] = value
 
bind m_double64 = value
 

Macro Definition Documentation

◆ STMT_ERROR_RETURN_RS

#define STMT_ERROR_RETURN_RS (   statement)
Value:
{ \
STMT_ERROR_NO_BRAKET(statement) \
}
Class representing a prepared statement with binding functionality.
Definition: statement.hpp:39

Definition at line 21 of file statement.cpp.

Referenced by mariadb::statement::query().

Function Documentation

◆ if()

if ( value)

◆ read()

value read ( bind.  buffer(),
bind.  length() 
)

◆ seekg() [1/2]

value seekg ( ,
std::ios_base::end   
)

◆ seekg() [2/2]

value seekg ( )

◆ set() [1/16]

bind set ( MYSQL_TYPE_BLOB  ,
value->  get(),
value->  size() 
)

◆ set() [2/16]

bind set ( MYSQL_TYPE_DATETIME  )

◆ set() [3/16]

bind set ( MYSQL_TYPE_DATE  )

◆ set() [4/16]

bind set ( MYSQL_TYPE_TIME  )

◆ set() [5/16]

bind set ( MYSQL_TYPE_STRING  ,
str.  c_str(),
str.  size() 
)

◆ set() [6/16]

bind set ( MYSQL_TYPE_STRING  ,
value.  c_str(),
value.  size() 
)

◆ set() [7/16]

bind set ( MYSQL_TYPE_TINY  )

◆ set() [8/16]

bind set ( MYSQL_TYPE_TINY  ,
nullptr  ,
,
true   
)

◆ set() [9/16]

bind set ( MYSQL_TYPE_SHORT  ,
nullptr  ,
,
true   
)

◆ set() [10/16]

bind set ( MYSQL_TYPE_SHORT  )

◆ set() [11/16]

bind set ( MYSQL_TYPE_LONG  ,
nullptr  ,
,
true   
)

◆ set() [12/16]

bind set ( MYSQL_TYPE_LONG  )

◆ set() [13/16]

bind set ( MYSQL_TYPE_LONGLONG  ,
nullptr  ,
,
true   
)

◆ set() [14/16]

bind set ( MYSQL_TYPE_LONGLONG  )

◆ set() [15/16]

bind set ( MYSQL_TYPE_FLOAT  )

◆ set() [16/16]

bind set ( MYSQL_TYPE_DOUBLE  )

Variable Documentation

◆ m_double64

bind m_double64 = value

Definition at line 169 of file statement.cpp.

◆ m_float32

bind m_float32[0] = value

Definition at line 164 of file statement.cpp.

◆ m_signed64

bind m_signed64 = value

Definition at line 129 of file statement.cpp.

◆ m_time

bind m_time = value.mysql_time()

Definition at line 95 of file statement.cpp.

◆ m_unsigned64

bind m_unsigned64 = value

Definition at line 119 of file statement.cpp.

◆ set

bind set ( MYSQL_TYPE_BLOB  ,
nullptr  ,
static_cast< long unsigned int >  size 
)

◆ size

u64 size = value->tellg()

Definition at line 80 of file statement.cpp.

Referenced by wb::action::action(), gui2::gui_definition::activate(), gui2::scrollbar_base::all_items_visible(), plugins_manager::any_running(), gui2::slider_base::at_end(), wb::attack::attack(), BF_decode(), BF_encode(), gui2::implementation::builder_drawing::build(), gui2::spacer::calculate_best_size(), gui2::size_lock::calculate_best_size(), gui2::matrix::calculate_best_size(), gui2::grid::calculate_best_size(), team::calculate_enemies(), font::pango_text::calculate_size(), editor::editor_controller::can_execute_command(), gui2::grid::can_mouse_focus(), gui2::widget::can_mouse_focus(), ai::cfun_ai_get_recruitment_pattern(), events::menu_handler::change_side(), team::shroud_map::clear(), gui2::text_box::clear(), gui2::grid_implementation::column_request_reduce_width(), gui2::scrollbar_container::content_resize_request(), utils::basic_string_view< charT, traits >::copy(), gui2::dialogs::chat_log::model::count_of_pages(), gui2::policy::placement::independent::create_item(), cut_surface(), wfl::builtins::DEFINE_WFL_FUNCTION(), editor::editor_controller::do_execute_command(), do_replay_handle(), editor::location_palette::draw_contents(), editor::editor_palette< overlay >::draw_contents(), wb::draw_numbers(), editor::editor_display::draw_sidebar(), font::draw_text(), DumpString(), combatant::fight(), filesystem::file_size(), gui2::scrollbar_container::finalize_subclass(), utils::basic_string_view< charT, traits >::find(), wfl::formula_function_expression::formula_function_expression(), game_launcher::game_launcher(), gui2::styled_widget::get_best_text_size(), wfl::function_symbol_table::get_builtins(), variable_info_implementation::get_child_range(), gui2::tree_view_node::get_current_size(), filesystem::get_files_in_dir(), gui2::tree_view_node::get_folded_size(), font::sdl_ttf::get_font(), plugins_manager::get_kernel_base(), gui2::size_lock::get_state(), get_system_username(), gui2::tree_view_node::get_unfolded_size(), growstack(), campaignd::server::handle_request_campaign(), filesystem::ifs_read(), impl_unit_attacks_len(), display::init_flags_for_side_internal(), intf_default_generate_height_map(), intf_describe_plugins(), game_lua_kernel::intf_find_cost_map(), game_lua_kernel::intf_find_path(), game_lua_kernel::intf_find_reach(), game_lua_kernel::intf_get_fog_or_shroud(), game_lua_kernel::intf_get_side(), game_lua_kernel::intf_is_enemy(), game_lua_kernel::intf_match_side(), game_lua_kernel::intf_print(), game_lua_kernel::intf_put_recall_unit(), lua_fileops::intf_read_file(), spirit_po::po_message::is_plural(), gui2::window_implementation::layout(), gui2::grid::layout(), gui2::window::layout(), gui2::window::layout_linked_widgets(), LoadString(), luaD_growstack(), luaL_loadbufferx(), luaL_tolstring(), luaS_resize(), luaZ_fill(), plugins_manager::notify_event(), filesystem::ofs_write(), font::open_font_impl(), utils::operator<<(), addon_info::operator=(), packint(), php_crypt_blowfish_rn(), team::shroud_map::place(), gui2::policy::placement::table::place(), plugins_manager::play_slice(), turn_info::process_network_data(), propagatemark(), ucs4_convert_impl::utf8_impl::read(), addon_info::read(), gui2::container_base::reduce_height(), gui2::grid::reduce_height(), gui2::container_base::reduce_width(), gui2::grid::reduce_width(), gui2::grid::request_placement(), gui2::container_base::request_reduce_height(), gui2::scrollbar_container::request_reduce_height(), gui2::styled_widget::request_reduce_height(), gui2::policy::placement::horizontal_list::request_reduce_height(), gui2::grid::request_reduce_height(), gui2::policy::placement::vertical_list::request_reduce_height(), gui2::container_base::request_reduce_width(), gui2::scrollbar_container::request_reduce_width(), gui2::styled_widget::request_reduce_width(), gui2::grid::request_reduce_width(), font::text_cache::resize(), gui2::tree_view::resize_content(), gui2::listbox::resize_content(), editor::map_fragment::rotate_60_ccw(), editor::map_fragment::rotate_60_cw(), gui2::grid_implementation::row_request_reduce_height(), preferences::save_sound_buffer_size(), wb::manager::save_temp_move(), CVideo::screen_area(), gui2::listbox::select_last_row(), wb::manager::send_network_data(), CVideo::set_help_string(), editor::mouse_action_item::set_item_mouse_overlay(), gui2::widget::set_layout_size(), editor::mouse_action_map_label::set_mouse_overlay(), editor::mouse_action_village::set_mouse_overlay(), editor::mouse_action_select::set_mouse_overlay(), editor::mouse_action_paste::set_mouse_overlay(), editor::mouse_action_starting_position::set_mouse_overlay(), display::set_playing_team(), display::set_team(), editor::mouse_action::set_terrain_mouse_overlay(), preferences::set_tile_size(), editor::mouse_action_unit::set_unit_mouse_overlay(), setarrayvector(), campaign_controller::show_carryover_message(), help::show_help(), utils::signed_percent(), special_locations_len(), str_pack(), str_packsize(), str_unpack(), utils::basic_string_view< charT, traits >::substr(), utils::detail::sv_insert_aligned(), tremove(), unpackint(), gui2::dialogs::game_cache_options::update_cache_size_display(), gui2::dialogs::chat_log::controller::update_view_from_model(), validate_side(), team::shroud_map::value(), game_events::WML_HANDLER_FUNCTION(), font::word_wrap_text(), and addon_info::write().

◆ str

std::string str = value.str()

Definition at line 110 of file statement.cpp.

Referenced by unit::ability_active(), about::credits_group::about_group::about_group(), game_classification::active_addons(), halo::halo_impl::add(), display_chat_manager::add_chat_message(), terrain_builder::add_constraints(), gui2::dialogs::statistics_dialog::add_damage_row(), lua_kernel_base::add_log(), gui2::dialogs::mp_staging::add_side_node(), schema_validation::wml_tag::add_switch(), unit_type::apply_scenario_fix(), unit_type_data::apply_scenario_fix(), synced_context::ask_server_choice(), attack_info(), auxgetstr(), auxsetstr(), battle_context_unit_stats::battle_context_unit_stats(), BOOST_AUTO_TEST_CASE(), unit_type::build_help_index(), utils::bullet_list(), wfl::formula_debugger::call_stack_push(), ai::cfun_ai_get_leader_ignores_keep(), ai::cfun_ai_get_passive_leader(), ai::cfun_ai_get_passive_leader_shares_keep(), gui::menu::change_item(), mp::game_info::check_addon_version_compatibility(), gui2::addon_list::colorize_addon_state_string(), ng::connect_engine::connect_engine(), context_free_grammar_generator::context_free_grammar_generator(), gui2::typed_formula< bool >::convert(), actions::undo_list::create_action(), ng::create_engine::create_engine(), CVideo::current_refresh_rate(), events::menu_handler::current_unit(), default_map_generator_job::default_generate_map(), wfl::builtins::DEFINE_WFL_FUNCTION(), gui2::dialogs::game_load::display_savegame_internal(), do_interpolation(), lg::scope_logger::do_log_entry(), gui::menu::draw_row(), DumpString(), play_controller::enter_textbox(), utf8::erase(), utils::escape(), gui2::dialogs::game_load::execute(), wfl::string_expression::execute(), editor::context_manager::expand_load_mru_menu(), unit_filter_impl::unit_filter_compound::fill(), unit_type::fill_variations(), gui2::dialogs::format_cost_string(), gui2::dialogs::format_if_leader(), unit_formula_manager::formula_vars(), ai::lua_object< T >::from_type(), wfl::function_expression::function_expression(), mp::game_info::game_info(), help::generate_era_topics(), gui2::dialogs::mp_join_game::generate_side_list(), help::generate_trait_topics(), preprocessor_data::get_chunk(), wfl::formula_expression::get_name(), map_location::get_opposite_dir(), wfl::variant_callable::get_serialized_string(), terrain_type_data::get_terrain_editor_string(), terrain_type_data::get_terrain_string(), get_time(), terrain_type_data::get_underlying_terrain_string(), wfl::unit_type_callable::get_value(), wfl::string_callable::get_value(), gui::textbox::handle_key_down(), handle_preprocess_command(), gui::textbox::handle_text_input(), campaignd::server::handle_upload(), ai::manager::has_manager(), gui2::text_box::history_down(), gui2::text_box::history_up(), game_lua_kernel::impl_game_config_get(), lua_kernel_base::impl_game_config_get(), lua_common::impl_gettext_tostr(), impl_race_tostring(), impl_side_tostring(), impl_unit_attack_tostring(), impl_unit_tostring(), impl_unit_type_tostring(), unit::init(), display::init_flags_for_side_internal(), lua_stringx::intf_format(), lua_stringx::intf_parse_range(), lua_kernel_base::intf_print(), lua_gui2::intf_set_dialog_visible(), lua_stringx::intf_str_map_split(), lua_stringx::intf_str_paren_split(), lua_stringx::intf_str_split(), lua_stringx::intf_str_trim(), game_lua_kernel::intf_terrain_mask(), gui::menu::style::item_size(), utils::join(), utils::join_map(), wfl::key_value_pair::key_value_pair(), game_config_manager::load_addons_cfg(), campaignd::server::load_config(), wesnothd::server::load_config(), game_config::load_config(), hotkey::load_from_config(), game_config_manager::load_game_config_with_loadscreen(), savegame::loadgame::load_game_ingame(), terrain_builder::load_images(), wfl::location_callable::location_callable(), lua_check_impl::lua_check(), gui2::dialogs::lua_interpreter::lua_model::lua_model(), lua_check_impl::lua_to_or_default(), luaW_toconfig(), luaW_tostring(), luaW_tostring_or_default(), MAKE_ENUM(), utils::make_unique(), terrain_filter::match_internal(), t_translation::max_map_size(), gui2::dialogs::maybe_inactive(), utils::might_contain_variables(), editor::context_manager::modified_maps(), editor::mouse_action_unit::move(), actions::move_unit_internal(), mp_game_settings::mp_game_settings(), ng::side_engine::new_config(), simple_wml::node::node(), gui2::dialogs::preferences_dialog::on_advanced_prefs_list_select(), gui2::dialogs::statistics_dialog::on_primary_list_select(), filesystem::file_tree_checksum::operator!=(), help::unit_topic_generator::operator()(), lua_kernel_base::command_log::operator<<(), t_translation::operator<<(), utils::operator<<(), events::cmd_arg_parser::parse(), map_location::parse_direction(), parse_network_address(), ng::side_engine::place_user(), place_village(), placing_score(), gui2::dialogs::preferences_dialog::post_build(), gui2::dialogs::mp_lobby::post_build(), saved_game::post_scenario_generation(), gui2::dialogs::campaign_difficulty::post_show(), gui2::dialogs::terrain_layers::pre_show(), gui2::dialogs::end_credits::pre_show(), gui2::dialogs::mp_change_control::pre_show(), gui2::dialogs::label_settings::pre_show(), gui2::dialogs::mp_join_game::pre_show(), gui2::dialogs::editor_set_starting_position::pre_show(), gui2::dialogs::faction_select::pre_show(), gui2::dialogs::mp_staging::pre_show(), gui2::dialogs::unit_create::pre_show(), ng::create_engine::prepare_for_era_and_mods(), gui2::unit_preview_pane::print_attack_details(), gui2::chatbox::process_message(), turn_info::process_network_data(), gui2::dialogs::addon_manager::publish_addon(), wesnothd::banned::read(), team::team_info::read(), terrain_label::read(), addon_info::read(), schema_validation::schema_validator::read_config_file(), read_rect(), read_rules_vector(), display::refresh_report(), REPORT_GENERATOR(), tod_manager::resolve_random(), storyscreen::story_parser::resolve_wml(), storyscreen::part::resolve_wml(), lua_kernel_base::run_lua_tag(), gui2::addon_list::set_addon_shown(), unit_type_data::set_config(), gui2::dialogs::attack_predictions::set_data(), editor::context_manager::set_default_dir(), gui2::unit_preview_pane::set_displayed_type(), gui2::unit_preview_pane::set_displayed_unit(), terrain_type::set_editor_group(), storyscreen::background_layer::set_file(), gui::widget::set_help_string(), font::text_surface::set_text(), gui::widget::set_tooltip_string(), setup_test_preproc_map(), filesystem::setup_user_data_dir(), gui2::dialogs::team_mode_controller::show_units(), attack_type::special_active_impl(), wfl::string_expression::str(), mariadb::data< Type >::string(), string_cast(), strip_cr(), SYNCED_COMMAND_HANDLER_FUNCTION(), gui2::dialogs::tally(), terrain_type::terrain_type(), time_of_day_at(), ai::formula_ai::to_config(), carryover::to_string(), utf8::truncate_as_ucs4(), gui2::typed_formula< bool >::typed_formula(), unarchive_file(), utils::unescape(), unit_abilities(), unit_alignment(), unit_defense(), unit_hp(), unit_helper::unit_level_tooltip(), unit_moves(), unit_name(), unit_race(), unit_traits(), unit_type(), unit_vision(), unit_weapons(), unit_xp(), mp_game_settings::update_addon_requirements(), game_events::wml_menu_item::update_command(), addons_client::update_last_error(), gui2::dialogs::sub_player_list::update_player_count_label(), schema_validation::schema_self_validator::validate_key(), game_events::WML_HANDLER_FUNCTION(), unit_formula_manager::write(), gui2::dialogs::write_actual_and_expected(), savegame::savegame::write_game(), t_translation::write_game_map(), and lg::scope_logger::~scope_logger().