MySQL 8.0.31
Source Code Documentation
table_access_service.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2022, 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:245
TA_table(* get_table_v1_t)(Table_access ta, size_t ticket)
Get an opened table.
Definition: table_access_bits.h:190
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:146
int(* delete_row_v1_t)(Table_access ta, TA_table table)
Delete the current row.
Definition: table_access_bits.h:291
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:250
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:255
int(* update_row_v1_t)(Table_access ta, TA_table table)
Update the current row.
Definition: table_access_bits.h:286
int(* rollback_v1_t)(Table_access ta)
Rollback changes.
Definition: table_access_bits.h:180
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:271
int(* index_end_v1_t)(Table_access ta, TA_table table, TA_key key)
Close an index.
Definition: table_access_bits.h:261
int(* commit_v1_t)(Table_access ta)
Commit changes.
Definition: table_access_bits.h:175
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:222
int(* rnd_end_v1_t)(Table_access ta, TA_table table)
End a full table scan.
Definition: table_access_bits.h:276
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:320
int(* write_row_v1_t)(Table_access ta, TA_table table)
Insert a new row in the table.
Definition: table_access_bits.h:281
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:296
void(* destroy_table_access_v1_t)(Table_access ta)
Destroy a table access object.
Definition: table_access_bits.h:131
int(* rnd_init_v1_t)(Table_access ta, TA_table table)
Start a full table scan.
Definition: table_access_bits.h:266
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:332
bool(* is_field_null_v1_t)(Table_access ta, TA_table table, size_t index)
Is a column NULL.
Definition: table_access_bits.h:302
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:197
Table_access(* create_table_access_v1_t)(MYSQL_THD thd, size_t count)
Create a table access object.
Definition: table_access_bits.h:125
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:350
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:341
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:239
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:326
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:314
int(* begin_v1_t)(Table_access ta)
Start a table access transaction.
Definition: table_access_bits.h:170
static uint update
Definition: myisamlog.cc:90
void insert(dd::cache::SPI_lru_cache_owner_ptr &c, dd::Object_id id)
Definition: dictionary_client.cc:3241
static mysql_service_status_t get(reference_caching_cache cache, unsigned service_name_index, const my_h_service **refs) noexcept
Definition: component.cc:113
static mysql_service_status_t add(reference_caching_channel channel, const char *implementation_name) noexcept
Definition: component.cc:134
static mysql_service_status_t create(const char *service_names[], reference_caching_channel *out_channel) noexcept
Definition: component.cc:35
static mysql_service_status_t destroy(reference_caching_channel channel) noexcept
Definition: component.cc:49
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:2863
#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.