MySQL 26.7.0
Source Code Documentation
common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023, 2026, Oracle and/or its affiliates.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License, version 2.0,
6 * as published by the Free Software Foundation.
7 *
8 * This program is designed to work with certain software (including
9 * but not limited to OpenSSL) that is licensed under separate terms,
10 * as designated in a particular file or component or in included license
11 * documentation. The authors of MySQL hereby grant you an additional
12 * permission to link the program and your derivative works with the
13 * separately licensed software that they have either included with
14 * the program or referenced in the documentation.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
19 * the GNU General Public License, version 2.0, for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26#ifndef ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_DATABASE_JSON_MAPPER_VIEW_COMMON_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_DATABASE_JSON_MAPPER_VIEW_COMMON_H_
28
29#ifdef RAPIDJSON_NO_SIZETYPEDEFINE
30#include "my_rapidjson_size_t.h"
31#endif
32
33#include <rapidjson/document.h>
34#include <memory>
35#include <string>
36#include <utility>
37#include <vector>
49
50namespace mrs {
51namespace database {
52namespace dv {
53
54using namespace helper::json::sql;
55
57
59 const std::vector<mysqlrouter::sqlstring> &strings, const std::string &sep);
60
62 const rapidjson::Value &value,
63 bool throw_if_missing_or_null);
64
66 const ObjectRowOwnership &row_ownership,
67 PrimaryKeyColumnValues &pk_values);
68
69} // namespace dv
70} // namespace database
71} // namespace mrs
72
73#endif // ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_DATABASE_JSON_MAPPER_VIEW_COMMON_H_
mysqlrouter::MySQLSession MySQLSession
Definition: bootstrap_mysql_account.cc:40
Definition: mysql_session.h:157
Definition: utils_sqlstring.h:67
Define rapidjson::SizeType to be std::uint64_t.
PT & ref(PT *tp)
Definition: tablespace_impl.cc:359
Definition: to_sqlstring.h:78
entry::ForeignKeyReference ForeignKeyReference
Definition: select.h:54
PrimaryKeyColumnValues ref_primary_key(const ForeignKeyReference &ref, const rapidjson::Value &value, bool throw_if_missing_or_null)
Definition: common.cc:46
void validate_primary_key_values(const entry::JsonMapping &view, const ObjectRowOwnership &row_ownership, PrimaryKeyColumnValues &pk_values)
Definition: common.cc:81
mysqlrouter::sqlstring join_sqlstrings(const std::vector< mysqlrouter::sqlstring > &strings, const std::string &sep)
Definition: common.cc:36
Object JsonMapping
Definition: object.h:357
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
std::map< std::string, mysqlrouter::sqlstring > PrimaryKeyColumnValues
Definition: select.h:43
Definition: authorize_manager.h:48