MySQL 9.1.0
Source Code Documentation
raw_table.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef DD__RAW_TABLE_INCLUDED
25#define DD__RAW_TABLE_INCLUDED
26
27#include <memory>
28
29#include "sql/dd/string_type.h" // dd::String_type
30#include "sql/table.h" // Table_ref
31#include "thr_lock.h"
32
33namespace dd {
34
35///////////////////////////////////////////////////////////////////////////
36
37class Object_key;
38class Raw_new_record;
39class Raw_record;
40class Raw_record_set;
41
42///////////////////////////////////////////////////////////////////////////
43
44class Raw_table {
45 public:
46 Raw_table(thr_lock_type lock_type, const String_type &name);
47
48 virtual ~Raw_table() = default;
49
50 public:
52
54
55 public:
56 bool find_record(const Object_key &key, std::unique_ptr<Raw_record> &r);
57
58 bool find_last_record(const Object_key &key, std::unique_ptr<Raw_record> &r);
59
61 std::unique_ptr<Raw_record> &r);
62
64
65 public:
66 bool open_record_set(const Object_key *key,
67 std::unique_ptr<Raw_record_set> &rs);
68
69 private:
71};
72
73///////////////////////////////////////////////////////////////////////////
74
75} // namespace dd
76
77#endif // DD__RAW_TABLE_INCLUDED
Definition: table.h:2900
TABLE * table
Definition: table.h:3677
Definition: object_key.h:38
Definition: raw_record.h:141
Definition: raw_table.h:44
bool find_record(const Object_key &key, std::unique_ptr< Raw_record > &r)
Find record and populate raw_record.
Definition: raw_table.cc:66
Table_ref * get_table_ref()
Definition: raw_table.h:53
bool open_record_set(const Object_key *key, std::unique_ptr< Raw_record_set > &rs)
Initiate table scan operation for the given key.
Definition: raw_table.cc:149
TABLE * get_table()
Definition: raw_table.h:51
Raw_new_record * prepare_record_for_insert()
Definition: raw_table.cc:136
Raw_table(thr_lock_type lock_type, const String_type &name)
Definition: raw_table.cc:47
Table_ref m_table_ref
Definition: raw_table.h:70
virtual ~Raw_table()=default
bool prepare_record_for_update(const Object_key &key, std::unique_ptr< Raw_record > &r)
Write modified data into row buffer.
Definition: raw_table.cc:116
bool find_last_record(const Object_key &key, std::unique_ptr< Raw_record > &r)
Find last record in table and populate raw_record.
Definition: raw_table.cc:185
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:86
required string key
Definition: replication_asynchronous_connection_failover.proto:60
case opt name
Definition: sslopt-case.h:29
Definition: table.h:1421
thr_lock_type
Definition: thr_lock.h:51