SNode.C
Loading...
Searching...
No Matches
MariaDBUseResultCommand.h
Go to the documentation of this file.
1
/*
2
* SNode.C - a slim toolkit for network communication
3
* Copyright (C) Volker Christian <me@vchrist.at>
4
* 2020, 2021, 2022, 2023, 2024, 2025
5
* 2021, 2022 Daniel Flockert
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License as published
9
* by the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU Lesser General Public License for more details.
16
*
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#
ifndef
DATABASE_MARIADB_COMMANDS_SYNC_MARIADBUSERESULTCOMMAND
22
#
define
DATABASE_MARIADB_COMMANDS_SYNC_MARIADBUSERESULTCOMMAND
23
24
#
include
"database/mariadb/MariaDBCommandSync.h"
// IWYU pragma: export
25
26
#
ifndef
DOXYGEN_SHOULD_SKIP_THIS
27
28
#
endif
/* DOXYGEN_SHOULD_SKIP_THIS */
29
30
namespace
database::
mariadb
::commands::
sync
{
31
32
class
MariaDBUseResultCommand
:
public
MariaDBCommandSync
{
33
public
:
34
MariaDBUseResultCommand
(
const
std::function<
void
(MYSQL_RES*)>& onUseResult,
35
const
std::function<
void
(
const
std::string&,
unsigned
int
)>& onError);
36
37
private
:
38
int
commandStart
()
override
;
39
bool
commandCompleted
()
override
;
40
void
commandError
(
const
std::string& errorString,
unsigned
int
errorNumber)
override
;
41
42
MYSQL_RES
*
result
=
nullptr
;
43
44
const
std
::
function
<
void
(
MYSQL_RES
*)>
onUseResult
;
45
};
46
47
}
// namespace database::mariadb::commands::sync
48
49
#
endif
// DATABASE_MARIADB_COMMANDS_SYNC_MARIADBUSERESULTCOMMAND
database::mariadb::MariaDBCommandSync
Definition
MariaDBCommandSync.h:32
database::mariadb::commands::sync::MariaDBUseResultCommand
Definition
MariaDBUseResultCommand.h:32
database::mariadb::commands::sync::MariaDBUseResultCommand::onUseResult
const std::function< void(MYSQL_RES *)> onUseResult
Definition
MariaDBUseResultCommand.h:44
database::mariadb::commands::sync::MariaDBUseResultCommand::MariaDBUseResultCommand
MariaDBUseResultCommand(const std::function< void(MYSQL_RES *)> &onUseResult, const std::function< void(const std::string &, unsigned int)> &onError)
Definition
MariaDBUseResultCommand.cpp:29
database::mariadb::commands::sync::MariaDBUseResultCommand::commandStart
int commandStart() override
Definition
MariaDBUseResultCommand.cpp:35
database::mariadb::commands::sync::MariaDBUseResultCommand::result
MYSQL_RES * result
Definition
MariaDBUseResultCommand.h:42
database::mariadb::commands::sync::MariaDBUseResultCommand::commandCompleted
bool commandCompleted() override
Definition
MariaDBUseResultCommand.cpp:41
database::mariadb::commands::sync::MariaDBUseResultCommand::commandError
void commandError(const std::string &errorString, unsigned int errorNumber) override
Definition
MariaDBUseResultCommand.cpp:47
database::mariadb::commands::sync
Definition
MariaDBAffectedRowsCommand.cpp:27
database
Definition
MariaDBClient.h:39
database
mariadb
commands
sync
MariaDBUseResultCommand.h
Generated on Mon Feb 10 2025 20:20:57 for SNode.C by
1.11.0