MySQL 9.1.0
Source Code Documentation
s_mysql_mysql_query_attributes_iterator Struct Reference

A service to fetch the query attributes for the current thread. More...

#include <mysql_query_attributes.h>

Public Attributes

mysql_service_status_t(* create )(THD *thd, const char *name, mysqlh_query_attributes_iterator *out_iterator)
 Creates iterator that iterates through all parameters supplied. More...
 
mysql_service_status_t(* get_type )(mysqlh_query_attributes_iterator iterator, enum enum_field_types *out_type)
 Gets the type of element pointed to by the iterator. More...
 
mysql_service_status_t(* next )(mysqlh_query_attributes_iterator iter)
 Advances specified iterator to next element. More...
 
mysql_service_status_t(* get_name )(mysqlh_query_attributes_iterator iterator, my_h_string *out_name_handle)
 Gets the name of the parameter. More...
 
void(* release )(mysqlh_query_attributes_iterator iterator)
 Releases the Service Implementations iterator. More...
 

Detailed Description

A service to fetch the query attributes for the current thread.

Use in conjunction with all the related services that operate on thread ids

See also
mysql_component_mysql_query_attributes_imp

Member Data Documentation

◆ create

mysql_service_status_t(* s_mysql_mysql_query_attributes_iterator::create) (THD *thd, const char *name, mysqlh_query_attributes_iterator *out_iterator)

Creates iterator that iterates through all parameters supplied.

The iterator will be positioned at the first parameter if any.

Parameters
thdThe thread handle for the thread you want data for. It NULL it will read the current thread.
nameThe name of the parameter to position on. UTF8mb4. if non-NULL will position the iterator on the first occurrence of a parameter with the specified name, if any.
[out]out_iteratorplace to store the iterator handle.
Returns
Status of performed operation
Return values
falsesuccess. Can read data.
truefailure. Either failed to initialize iterator or no parameters to read.

◆ get_name

mysql_service_status_t(* s_mysql_mysql_query_attributes_iterator::get_name) (mysqlh_query_attributes_iterator iterator, my_h_string *out_name_handle)

Gets the name of the parameter.

Parameters
iteratorquery attributes iterator handle.
[out]out_name_handlethe name of the parameter if supplied. Otherwise a nullptr.
Returns
status of operation
Return values
falseValid
trueInvalid iterator or not on an element

◆ get_type

mysql_service_status_t(* s_mysql_mysql_query_attributes_iterator::get_type) (mysqlh_query_attributes_iterator iterator, enum enum_field_types *out_type)

Gets the type of element pointed to by the iterator.

Parameters
iteratorquery attributes iterator handle.
[out]out_typeplace to store the parameter type.
Returns
status of performed operation
Return values
falsesuccess
trueInvalid iterator or not on an element

◆ next

mysql_service_status_t(* s_mysql_mysql_query_attributes_iterator::next) (mysqlh_query_attributes_iterator iter)

Advances specified iterator to next element.

Parameters
iteratoriterator handle to advance.
Returns
Status of performed operation and validity of iterator after operation.
Return values
falsesuccess
trueFailure or no more elements

◆ release

void(* s_mysql_mysql_query_attributes_iterator::release) (mysqlh_query_attributes_iterator iterator)

Releases the Service Implementations iterator.

Releases read lock on the Registry.

Parameters
iteratorService Implementation iterator handle.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

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