MySQL 8.4.1
Source Code Documentation
s_mysql_mysql_stmt_attributes Struct Reference

#include <mysql_statement_service.h>

Public Attributes

mysql_service_status_t(* get )(my_h_statement statement, mysql_cstring_with_length name, void *value)
 Get the current value for a statement attribute. More...
 
mysql_service_status_t(* set )(my_h_statement statement, mysql_cstring_with_length name, const void *value)
 Set the value of a statement attribute. More...
 

Member Data Documentation

◆ get

mysql_service_status_t(* s_mysql_mysql_stmt_attributes::get) (my_h_statement statement, mysql_cstring_with_length name, void *value)

Get the current value for a statement attribute.

Parameters
[in]statementA handle to the statement
[in]nameAttribute name to get

The following attributes are supported:

  • Buffer capacity of the statement ("buffer_capacity" of the input size_t type, default: 500)
  • Number of prefetch rows for prepared statements ("prefetch_rows" of the input size_t type, default: 1)
  • Expected charset name ("charset_name" of the input mysql_cstring_with_length type, default: utf8mb4)
  • Use the existing protocol from thd ("use_thd_protocol" of the input bool type, default: false)
Parameters
[out]valueThe value of the attribute
Return values
falsesuccess
truefailure

◆ set

mysql_service_status_t(* s_mysql_mysql_stmt_attributes::set) (my_h_statement statement, mysql_cstring_with_length name, const void *value)

Set the value of a statement attribute.

Note
Setting the attribute is only allowed after init and before prepare/execute.
Parameters
[in]statementA handle to the statement
[in]nameAttribute name to be set
[in]valueThe value of the attribute
Return values
falsesuccess
truefailure

The documentation for this struct was generated from the following file: