MySQL 9.7.0
Source Code Documentation
dml.h
Go to the documentation of this file.
1#pragma once
2
3/* Copyright (c) 2024, 2026, Oracle and/or its affiliates.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License, version 2.0,
7 as published by the Free Software Foundation.
8
9 This program is designed to work with certain software (including
10 but not limited to OpenSSL) that is licensed under separate terms,
11 as designated in a particular file or component or in included license
12 documentation. The authors of MySQL hereby grant you an additional
13 permission to link the program and your derivative works with the
14 separately licensed software that they have either included with
15 the program or referenced in the documentation.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License, version 2.0, for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
25
26#include "mem_root_deque.h"
27
28class THD;
29class Table_ref;
31class Item;
33
34namespace jdv {
35
36[[nodiscard]] bool jdv_prepare_insert(THD *, const Table_ref *,
38
39[[nodiscard]] bool jdv_prepare_update(THD *, const Table_ref *, bool);
40
41[[nodiscard]] bool jdv_prepare_delete(THD *, const Table_ref *, bool);
42
43[[nodiscard]] bool jdv_insert(THD *, const Table_ref *,
45
46[[nodiscard]] bool jdv_update(THD *thd, const Table_ref *,
49
50[[nodiscard]] bool jdv_delete(THD *thd, const Table_ref *, ulonglong *);
51
52} // namespace jdv
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:929
Base class for all INSERT and REPLACE statements.
Definition: sql_insert.h:226
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: table.h:2958
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:172
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Definition: content_tree.cc:39
bool jdv_update(THD *thd, const Table_ref *dvtr, const mem_root_deque< Item * > *seldq, const mem_root_deque< Item * > *upddq, ulonglong *affected_rows)
Entry point called from sql_update.cc bool Sql_cmd_update::update_single_table(THD *thd);.
Definition: dml.cc:2912
bool jdv_delete(THD *thd, const Table_ref *dvtr, ulonglong *affected_rows)
Entry point called from sql_delete.cc, bool Sql_cmd_delete::delete_from_single_table(THD *thd);.
Definition: dml.cc:2986
bool jdv_prepare_insert(THD *thd, const Table_ref *view, Sql_cmd_insert_base *sql_insert_cmd)
Performs sanity checks specific to insert.
Definition: dml.cc:2659
bool jdv_prepare_update(THD *thd, const Table_ref *view, bool is_single_table_plan)
Performs sanity checks specific to update.
Definition: dml.cc:2713
bool jdv_insert(THD *thd, const Table_ref *dvtr, const mem_root_deque< List_item * > &values)
Entry point called from sql_insert.cc, bool Sql_cmd_insert_values::execute_inner(THD *thd);.
Definition: dml.cc:2839
bool jdv_prepare_delete(THD *thd, const Table_ref *view, bool is_single_table_plan)
Performs sanity checks specific to delete.
Definition: dml.cc:2754