MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
s_mysql_mysql_library Struct Reference

Services for reading the properties of the Libraries that are imported by the routines. More...

#include <mysql_library.h>

Public Attributes

mysql_service_status_t(* exists )(THD *thd, mysql_cstring_with_length schema_name, mysql_cstring_with_length library_name, mysql_cstring_with_length version, bool *result)
 Checks if library exists. More...
 
mysql_service_status_t(* init )(THD *thd, mysql_cstring_with_length schema_name, mysql_cstring_with_length library_name, mysql_cstring_with_length version, my_h_library *library_handle)
 Construct a new library object. More...
 
mysql_service_status_t(* get_body )(my_h_library library_handle, mysql_cstring_with_length *body)
 Get library's body. More...
 
mysql_service_status_t(* get_language )(my_h_library library_handle, mysql_cstring_with_length *language)
 Get library's language. More...
 
mysql_service_status_t(* deinit )(my_h_library library_handle)
 Clean up the resources related to a library. More...
 

Detailed Description

Services for reading the properties of the Libraries that are imported by the routines.

How to use: my_h_library library_handle; library->init(nullptr, schema, name, version, &library_handle); mysql_cstring_with_length body; library->get_body(library_handle, &body); ... use the body throughout the caller. library->deinit(library_handle);

Member Data Documentation

◆ deinit

mysql_service_status_t(* s_mysql_mysql_library::deinit) (my_h_library library_handle)

Clean up the resources related to a library.

Release the shared read lock.

Parameters
[in]library_handleA handle to the library.
Note
: library_handle will no longer be valid at the end of this function.
Returns
Status of the performed operation:
Return values
falsesuccess.
truefailure.

◆ exists

mysql_service_status_t(* s_mysql_mysql_library::exists) (THD *thd, mysql_cstring_with_length schema_name, mysql_cstring_with_length library_name, mysql_cstring_with_length version, bool *result)

Checks if library exists.

Parameters
[in]thd(optional) Thread where the check will be made. current_thd will be used if nullptr.
[in]schema_nameSchema where the library is stored.
[in]library_nameName of the library.
[in]versionVersion of the library.
[out]resultTrue if library exists, false otherwise.
Returns
Status of the performed operation:
Return values
falsesuccess.
truefailure.

◆ get_body

mysql_service_status_t(* s_mysql_mysql_library::get_body) (my_h_library library_handle, mysql_cstring_with_length *body)

Get library's body.

Parameters
[in]library_handleHandle to library.
[out]bodyLibrary's body.
Note
: The returned Library's body is valid only while the library_handle is valid.
Returns
Status of get operation:
Return values
falseSuccess.
trueFailure.

◆ get_language

mysql_service_status_t(* s_mysql_mysql_library::get_language) (my_h_library library_handle, mysql_cstring_with_length *language)

Get library's language.

Parameters
[in]library_handleHandle to library.
[out]languageLibrary's language.
Note
: The returned Library's language is valid only while the library_handle is valid.
Returns
Status of get operation:
Return values
falseSuccess.
trueFailure.

◆ init

mysql_service_status_t(* s_mysql_mysql_library::init) (THD *thd, mysql_cstring_with_length schema_name, mysql_cstring_with_length library_name, mysql_cstring_with_length version, my_h_library *library_handle)

Construct a new library object.

Locks the library object with a shared reentrant read-lock.

Note
If the library handle provided points to non-nullptr, an error is reported.
call deinit(library_handle) to release the lock.
Parameters
[in]thd(optional) Thread where the handle will be allocated. current_thd will be used if nullptr.
[in]schema_nameSchema where the library is stored.
[in]library_nameName of the library.
[in]versionVersion of the library.
[out]library_handleA handle to the library object. Must be set to nullptr when calling the function.
Returns
Status of the performed operation:
Return values
falsesuccess.
truefailure.

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