MySQL 8.2.0
Source Code Documentation
table_access_service.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2023, 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 also distributed 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 included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef COMPONENTS_SERVICES_TABLE_ACCESS_SERVICE_H
24#define COMPONENTS_SERVICES_TABLE_ACCESS_SERVICE_H
25
28
29/**
30 @defgroup group_table_access_services Table Access services
31 @ingroup group_components_services_inventory
32 @{
33*/
34
35/**
36 Table access service, factory.
37 Version 1.
38 Status: active
39*/
40BEGIN_SERVICE_DEFINITION(table_access_factory_v1)
41/** @sa create_table_access_v1_t */
43/** @sa destroy_table_access_v1_t */
45END_SERVICE_DEFINITION(table_access_factory_v1)
46
47/**
48 Table access service, table access.
49 Version 1.
50 Status: active
51*/
53/** @sa add_table_v1_t */
55/** @sa begin_v1_t */
57/** @sa commit_v1_t */
59/** @sa rollback_v1_t */
61/** @sa get_table_v1_t */
63/** @sa check_table_fields_v1_t */
65END_SERVICE_DEFINITION(table_access_v1)
66
67/**
68 Table access service, index scan.
69 Version 1.
70 Status: active
71*/
72BEGIN_SERVICE_DEFINITION(table_access_index_v1)
73/** @sa index_init_v1_t */
75/** @sa index_read_map_v1_t */
77/** @sa index_first_v1_t */
79/** @sa index_next_v1_t */
81/** @sa index_next_same_v1_t */
83/** @sa index_end_v1_t */
85END_SERVICE_DEFINITION(table_access_index_v1)
86
87/**
88 Table access service, table scan.
89 Version 1.
90 Status: active
91*/
92BEGIN_SERVICE_DEFINITION(table_access_scan_v1)
93/** @sa rnd_init_v1_t */
95/** @sa rnd_next_v1_t */
97/** @sa rnd_end_v1_t */
99END_SERVICE_DEFINITION(table_access_scan_v1)
100
101/**
102 Table access service, update.
103 Version 1.
104 Status: active
105*/
106BEGIN_SERVICE_DEFINITION(table_access_update_v1)
107/** @sa write_row_v1_t */
109/** @sa update_row_v1_t */
111/** @sa delete_row_v1_t */
113END_SERVICE_DEFINITION(table_access_update_v1)
114
115/**
116 Table access service, all columns.
117 Version 1.
118 Status: active
119*/
120BEGIN_SERVICE_DEFINITION(field_access_nullability_v1)
121/** @sa set_field_null_v1_t */
123/** @sa is_field_null_v1_t */
125END_SERVICE_DEFINITION(field_access_nullability_v1)
126
127/**
128 Table access service, integer columns.
129 Version 1.
130 Status: active
131*/
132BEGIN_SERVICE_DEFINITION(field_integer_access_v1)
133/** @sa set_field_integer_value_v1_t */
135/** @sa get_field_integer_value_v1_t */
137END_SERVICE_DEFINITION(field_integer_access_v1)
138
139/**
140 Table access service, varchar columns.
141 Version 1.
142 Status: active
143*/
144BEGIN_SERVICE_DEFINITION(field_varchar_access_v1)
145/** @sa set_field_varchar_value_v1_t */
147/** @sa get_field_varchar_value_v1_t */
149END_SERVICE_DEFINITION(field_varchar_access_v1)
150
151/**
152 Table access service, any columns.
153 Version 1.
154 Status: active
155*/
156BEGIN_SERVICE_DEFINITION(field_any_access_v1)
157/** @sa set_field_any_value_v1_t */
159/** @sa get_field_any_value_v1_t */
161END_SERVICE_DEFINITION(field_any_access_v1)
162
163/**
164 @} (end of group_table_access_services)
165*/
166
167#endif /* COMPONENTS_SERVICES_TABLE_ACCESS_SERVICE_H */
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:570
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:257
TA_table(* get_table_v1_t)(Table_access ta, size_t ticket)
Get an opened table.
Definition: table_access_bits.h:197
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:153
int(* delete_row_v1_t)(Table_access ta, TA_table table)
Delete the current row.
Definition: table_access_bits.h:303
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:262
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:267
int(* update_row_v1_t)(Table_access ta, TA_table table)
Update the current row.
Definition: table_access_bits.h:298
int(* rollback_v1_t)(Table_access ta)
Rollback changes.
Definition: table_access_bits.h:187
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:283
int(* index_end_v1_t)(Table_access ta, TA_table table, TA_key key)
Close an index.
Definition: table_access_bits.h:273
int(* commit_v1_t)(Table_access ta)
Commit changes.
Definition: table_access_bits.h:182
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:234
int(* rnd_end_v1_t)(Table_access ta, TA_table table)
End a full table scan.
Definition: table_access_bits.h:288
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:332
int(* write_row_v1_t)(Table_access ta, TA_table table)
Insert a new row in the table.
Definition: table_access_bits.h:293
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:308
void(* destroy_table_access_v1_t)(Table_access ta)
Destroy a table access object.
Definition: table_access_bits.h:138
int(* rnd_init_v1_t)(Table_access ta, TA_table table)
Start a full table scan.
Definition: table_access_bits.h:278
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:344
bool(* is_field_null_v1_t)(Table_access ta, TA_table table, size_t index)
Is a column NULL.
Definition: table_access_bits.h:314
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:204
Table_access(* create_table_access_v1_t)(MYSQL_THD thd, size_t count)
Create a table access object.
Definition: table_access_bits.h:132
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:362
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:353
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:251
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:338
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:326
int(* begin_v1_t)(Table_access ta)
Start a table access transaction.
Definition: table_access_bits.h:177
static uint update
Definition: myisamlog.cc:93
void * begin(THD *thd, const TABLE *table, size_t data_size, size_t memory, size_t num_threads) noexcept
Definition: bulk_data_service.cc:1533
void insert(dd::cache::SPI_lru_cache_owner_ptr &c, dd::Object_id id)
Definition: dictionary_client.cc:3251
static int destroy(mysql_cond_t *that, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:53
void get(PSI_field *, PSI_longlong *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:31
static mysql_service_status_t add(reference_caching_channel channel, const char *implementation_name) noexcept
Definition: component.cc:126
static mysql_service_status_t create(const char *service_names[], reference_caching_channel *out_channel) noexcept
Definition: component.cc:44
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:191
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2881
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
static bool rollback(THD *thd)
Abort the current statement and transaction.
Definition: sql_cmd_srs.cc:139
static bool commit(THD *thd)
Commit the current statement and transaction.
Definition: sql_cmd_srs.cc:151
Generic table access interface.