MySQL 8.3.0
Source Code Documentation
raw_table.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 2023, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef DD__RAW_TABLE_INCLUDED
24#define DD__RAW_TABLE_INCLUDED
25
26#include <memory>
27
28#include "sql/dd/string_type.h" // dd::String_type
29#include "sql/table.h" // Table_ref
30#include "thr_lock.h"
31
32namespace dd {
33
34///////////////////////////////////////////////////////////////////////////
35
36class Object_key;
37class Raw_new_record;
38class Raw_record;
39class Raw_record_set;
40
41///////////////////////////////////////////////////////////////////////////
42
43class Raw_table {
44 public:
45 Raw_table(thr_lock_type lock_type, const String_type &name);
46
47 virtual ~Raw_table() = default;
48
49 public:
51
53
54 public:
55 bool find_record(const Object_key &key, std::unique_ptr<Raw_record> &r);
56
57 bool find_last_record(const Object_key &key, std::unique_ptr<Raw_record> &r);
58
60 std::unique_ptr<Raw_record> &r);
61
63
64 public:
65 bool open_record_set(const Object_key *key,
66 std::unique_ptr<Raw_record_set> &rs);
67
68 private:
70};
71
72///////////////////////////////////////////////////////////////////////////
73
74} // namespace dd
75
76#endif // DD__RAW_TABLE_INCLUDED
Definition: table.h:2853
TABLE * table
Definition: table.h:3628
Definition: object_key.h:37
Definition: raw_record.h:140
Definition: raw_table.h:43
bool find_record(const Object_key &key, std::unique_ptr< Raw_record > &r)
Find record and populate raw_record.
Definition: raw_table.cc:65
Table_ref * get_table_ref()
Definition: raw_table.h:52
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:148
TABLE * get_table()
Definition: raw_table.h:50
Raw_new_record * prepare_record_for_insert()
Definition: raw_table.cc:135
Raw_table(thr_lock_type lock_type, const String_type &name)
Definition: raw_table.cc:46
Table_ref m_table_ref
Definition: raw_table.h:69
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:115
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:184
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:42
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:85
required string key
Definition: replication_asynchronous_connection_failover.proto:59
case opt name
Definition: sslopt-case.h:32
Definition: table.h:1403
thr_lock_type
Definition: thr_lock.h:50