MySQL 8.0.30
Source Code Documentation
client_query_attributes.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2020, 2022, 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 also distributed 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 included with MySQL.
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
25#ifndef CLIENT_QUERY_ATTRIBUTES_H
26#define CLIENT_QUERY_ATTRIBUTES_H
27
28#include "mysql.h"
29
31 public:
34 bool push_param(char *name, char *value);
36
37 void clear(MYSQL *mysql = nullptr);
38
39 private:
40 /* 32 should be enough for everybody */
41 static constexpr int max_count = 32;
42 const char *names[max_count];
44 unsigned count{0};
45};
46
48
49#endif
Definition: client_query_attributes.h:30
unsigned count
Definition: client_query_attributes.h:44
bool push_param(char *name, char *value)
Definition: client_query_attributes.cc:33
MYSQL_BIND values[max_count]
Definition: client_query_attributes.h:43
static constexpr int max_count
Definition: client_query_attributes.h:41
client_query_attributes()=default
void clear(MYSQL *mysql=nullptr)
Definition: client_query_attributes.cc:54
int set_params(MYSQL *mysql)
Definition: client_query_attributes.cc:47
const char * names[max_count]
Definition: client_query_attributes.h:42
~client_query_attributes()
Definition: client_query_attributes.h:33
client_query_attributes * global_attrs
Definition: client_query_attributes.cc:31
static MYSQL mysql
Definition: mysql.cc:153
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
case opt name
Definition: sslopt-case.h:32
Definition: mysql.h:652
Definition: mysql.h:298