MySQL 8.0.39
Source Code Documentation
s_mysql_mysql_text_consumer_factory_v1 Struct Reference

An implementation of these services will be called as the data resulting from calling mysql_query() service are produced by the server. More...

#include <mysql_command_consumer.h>

Public Attributes

mysql_service_status_t(* start )(SRV_CTX_H *srv_ctx_h, MYSQL_H *mysql_h)
 Prepares the data handle(srv_ctx_h), i.e allocates and prepares the Dom_ctx object and assigned to the srv_ctx_h. More...
 
void(* end )(SRV_CTX_H srv_ctx_h)
 Deallocates the memory allocated for data handle in start api. More...
 

Detailed Description

An implementation of these services will be called as the data resulting from calling mysql_query() service are produced by the server.

Most often the default implementation of this service that will cache the data into a memory structure into the MYSQL handle will be used. But this will only work if the resultset expected is relatively small.

Note
The default implementation will allow accessing the data after the query execution. This will not be possible with a custom method.

If one wants to avoid the memory caching and process the data SAX style as they are returned by the SQL execution define, they should provide their own implementation of this service that will process the data differently at the time of their production.

A service that provides the apis for start and end.

Member Data Documentation

◆ end

void(* s_mysql_mysql_text_consumer_factory_v1::end) (SRV_CTX_H srv_ctx_h)

Deallocates the memory allocated for data handle in start api.

Parameters
srv_ctx_hdom data handle(Dom_ctx type), which needs to be deallocated.
Returns
status of operation
Return values
void

◆ start

mysql_service_status_t(* s_mysql_mysql_text_consumer_factory_v1::start) (SRV_CTX_H *srv_ctx_h, MYSQL_H *mysql_h)

Prepares the data handle(srv_ctx_h), i.e allocates and prepares the Dom_ctx object and assigned to the srv_ctx_h.

Parameters
[out]srv_ctx_hDom_ctx data handle.
mysql_hmysql handle used to prepare srv_ctx_h
Returns
status of operation
Return values
falsesuccess. srv_ctx_h was prepared.
truefailure. OOM or invalid mysql_h.

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