MySQL 8.4.2
Source Code Documentation
table_access_service.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef COMPONENTS_SERVICES_TABLE_ACCESS_SERVICE_H
25#define COMPONENTS_SERVICES_TABLE_ACCESS_SERVICE_H
26
29
30/**
31 @defgroup group_table_access_services Table Access services
32 @ingroup group_components_services_inventory
33 @{
34*/
35
36/**
37 Table access service, factory.
38 Version 1.
39 Status: active
40*/
41BEGIN_SERVICE_DEFINITION(table_access_factory_v1)
42/** @sa create_table_access_v1_t */
44/** @sa destroy_table_access_v1_t */
46END_SERVICE_DEFINITION(table_access_factory_v1)
47
48/**
49 Table access service, table access.
50 Version 1.
51 Status: active
52*/
54/** @sa add_table_v1_t */
56/** @sa begin_v1_t */
58/** @sa commit_v1_t */
60/** @sa rollback_v1_t */
62/** @sa get_table_v1_t */
64/** @sa check_table_fields_v1_t */
66END_SERVICE_DEFINITION(table_access_v1)
67
68/**
69 Table access service, index scan.
70 Version 1.
71 Status: active
72*/
73BEGIN_SERVICE_DEFINITION(table_access_index_v1)
74/** @sa index_init_v1_t */
76/** @sa index_read_map_v1_t */
78/** @sa index_first_v1_t */
80/** @sa index_next_v1_t */
82/** @sa index_next_same_v1_t */
84/** @sa index_end_v1_t */
86END_SERVICE_DEFINITION(table_access_index_v1)
87
88/**
89 Table access service, table scan.
90 Version 1.
91 Status: active
92*/
93BEGIN_SERVICE_DEFINITION(table_access_scan_v1)
94/** @sa rnd_init_v1_t */
96/** @sa rnd_next_v1_t */
98/** @sa rnd_end_v1_t */
100END_SERVICE_DEFINITION(table_access_scan_v1)
101
102/**
103 Table access service, update.
104 Version 1.
105 Status: active
106*/
107BEGIN_SERVICE_DEFINITION(table_access_update_v1)
108/** @sa write_row_v1_t */
110/** @sa update_row_v1_t */
112/** @sa delete_row_v1_t */
114END_SERVICE_DEFINITION(table_access_update_v1)
115
116/**
117 Table access service, all columns.
118 Version 1.
119 Status: active
120*/
121BEGIN_SERVICE_DEFINITION(field_access_nullability_v1)
122/** @sa set_field_null_v1_t */
124/** @sa is_field_null_v1_t */
126END_SERVICE_DEFINITION(field_access_nullability_v1)
127
128/**
129 Table access service, integer columns.
130 Version 1.
131 Status: active
132*/
133BEGIN_SERVICE_DEFINITION(field_integer_access_v1)
134/** @sa set_field_integer_value_v1_t */
136/** @sa get_field_integer_value_v1_t */
138END_SERVICE_DEFINITION(field_integer_access_v1)
139
140/**
141 Table access service, varchar columns.
142 Version 1.
143 Status: active
144*/
145BEGIN_SERVICE_DEFINITION(field_varchar_access_v1)
146/** @sa set_field_varchar_value_v1_t */
148/** @sa get_field_varchar_value_v1_t */
150END_SERVICE_DEFINITION(field_varchar_access_v1)
151
152/**
153 Table access service, any columns.
154 Version 1.
155 Status: active
156*/
157BEGIN_SERVICE_DEFINITION(field_any_access_v1)
158/** @sa set_field_any_value_v1_t */
160/** @sa get_field_any_value_v1_t */
162END_SERVICE_DEFINITION(field_any_access_v1)
163
164/**
165 @} (end of group_table_access_services)
166*/
167
168#endif /* COMPONENTS_SERVICES_TABLE_ACCESS_SERVICE_H */
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:571
int destroy(azio_stream *s)
Definition: azio.cc:371
int(* index_first_v1_t)(Table_access ta, TA_table table, TA_key key)
Position on index at the beginning.
Definition: table_access_bits.h:258
TA_table(* get_table_v1_t)(Table_access ta, size_t ticket)
Get an opened table.
Definition: table_access_bits.h:198
size_t(* add_table_v1_t)(Table_access ta, const char *schema_name, size_t schema_name_length, const char *table_name, size_t table_name_length, TA_lock_type lock_type_arg)
Add a table to a table access session.
Definition: table_access_bits.h:154
int(* delete_row_v1_t)(Table_access ta, TA_table table)
Delete the current row.
Definition: table_access_bits.h:304
int(* index_next_v1_t)(Table_access ta, TA_table table, TA_key key)
Advance to the next record in the index.
Definition: table_access_bits.h:263
int(* index_next_same_v1_t)(Table_access ta, TA_table table, TA_key key)
Advance to the next record that matches the current search key.
Definition: table_access_bits.h:268
int(* update_row_v1_t)(Table_access ta, TA_table table)
Update the current row.
Definition: table_access_bits.h:299
int(* rollback_v1_t)(Table_access ta)
Rollback changes.
Definition: table_access_bits.h:188
int(* rnd_next_v1_t)(Table_access ta, TA_table table)
Advance to the next record in a table scan.
Definition: table_access_bits.h:284
int(* index_end_v1_t)(Table_access ta, TA_table table, TA_key key)
Close an index.
Definition: table_access_bits.h:274
int(* commit_v1_t)(Table_access ta)
Commit changes.
Definition: table_access_bits.h:183
int(* index_init_v1_t)(Table_access ta, TA_table table, const char *index_name, size_t index_name_length, const TA_index_field_def *fields, size_t fields_count, TA_key *key)
Open a table index.
Definition: table_access_bits.h:235
int(* rnd_end_v1_t)(Table_access ta, TA_table table)
End a full table scan.
Definition: table_access_bits.h:289
int(* get_field_integer_value_v1_t)(Table_access ta, TA_table table, size_t index, long long *v)
Read an INTEGER column value.
Definition: table_access_bits.h:333
int(* write_row_v1_t)(Table_access ta, TA_table table)
Insert a new row in the table.
Definition: table_access_bits.h:294
void(* set_field_null_v1_t)(Table_access ta, TA_table table, size_t index)
Set a column to NULL.
Definition: table_access_bits.h:309
void(* destroy_table_access_v1_t)(Table_access ta)
Destroy a table access object.
Definition: table_access_bits.h:139
int(* rnd_init_v1_t)(Table_access ta, TA_table table)
Start a full table scan.
Definition: table_access_bits.h:279
int(* get_field_varchar_value_v1_t)(Table_access ta, TA_table table, size_t index, my_h_string v)
Read a VARCHAR column value.
Definition: table_access_bits.h:345
bool(* is_field_null_v1_t)(Table_access ta, TA_table table, size_t index)
Is a column NULL.
Definition: table_access_bits.h:315
int(* check_table_fields_v1_t)(Table_access ta, TA_table table, const TA_table_field_def *fields, size_t fields_count)
Check the actual table fields against expected fields.
Definition: table_access_bits.h:205
Table_access(* create_table_access_v1_t)(MYSQL_THD thd, size_t count)
Create a table access object.
Definition: table_access_bits.h:133
int(* get_field_any_value_v1_t)(Table_access ta, TA_table table, size_t index, my_h_string v)
Read any column value.
Definition: table_access_bits.h:363
int(* set_field_any_value_v1_t)(Table_access ta, TA_table table, size_t index, my_h_string v)
Write any column value.
Definition: table_access_bits.h:354
int(* index_read_map_v1_t)(Table_access ta, TA_table table, size_t num_parts, TA_key key)
Position a table index at a search key.
Definition: table_access_bits.h:252
int(* set_field_varchar_value_v1_t)(Table_access ta, TA_table table, size_t index, my_h_string v)
Write a VARCHAR column value.
Definition: table_access_bits.h:339
int(* set_field_integer_value_v1_t)(Table_access ta, TA_table table, size_t index, long long v)
Write an INTEGER column value.
Definition: table_access_bits.h:327
int(* begin_v1_t)(Table_access ta)
Start a table access transaction.
Definition: table_access_bits.h:178
static uint update
Definition: myisamlog.cc:94
void insert(dd::cache::SPI_lru_cache_owner_ptr &c, dd::Object_id id)
Definition: dictionary_client.cc:3252
const char * begin(const char *const c)
Definition: base64.h:44
void get(PSI_field *, PSI_longlong *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:32
static mysql_service_status_t add(reference_caching_channel channel, const char *implementation_name) noexcept
Definition: component.cc:127
static mysql_service_status_t create(const char *service_names[], reference_caching_channel *out_channel) noexcept
Definition: component.cc:45
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2882
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
static bool rollback(THD *thd)
Abort the current statement and transaction.
Definition: sql_cmd_srs.cc:140
static bool commit(THD *thd)
Commit the current statement and transaction.
Definition: sql_cmd_srs.cc:152
Generic table access interface.