TrinityCore
DatabaseEnvFwd.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef DatabaseEnvFwd_h__
19#define DatabaseEnvFwd_h__
20
21#include <future>
22#include <memory>
23
25class Field;
26
27class ResultSet;
28using QueryResult = std::shared_ptr<ResultSet>;
29using QueryResultFuture = std::future<QueryResult>;
30using QueryResultPromise = std::promise<QueryResult>;
31
36
38
39template<typename T>
41
46
48using PreparedQueryResult = std::shared_ptr<PreparedResultSet>;
49using PreparedQueryResultFuture = std::future<PreparedQueryResult>;
50using PreparedQueryResultPromise = std::promise<PreparedQueryResult>;
51
52class QueryCallback;
53
54template<typename T>
56
58
59class TransactionBase;
60
61using TransactionFuture = std::future<bool>;
62using TransactionPromise = std::promise<bool>;
63
64template<typename T>
65class Transaction;
66
68
69template<typename T>
70using SQLTransaction = std::shared_ptr<Transaction<T>>;
71
76
78using QueryResultHolderFuture = std::future<void>;
79using QueryResultHolderPromise = std::promise<void>;
80
81template<typename T>
82class SQLQueryHolder;
83
88
90
91// mysql
92struct MySQLHandle;
93struct MySQLResult;
94struct MySQLField;
95struct MySQLBind;
96struct MySQLStmt;
97
98#endif // DatabaseEnvFwd_h__
std::promise< PreparedQueryResult > PreparedQueryResultPromise
std::future< PreparedQueryResult > PreparedQueryResultFuture
std::promise< bool > TransactionPromise
std::promise< QueryResult > QueryResultPromise
SQLTransaction< HotfixDatabaseConnection > HotfixDatabaseTransaction
SQLTransaction< WorldDatabaseConnection > WorldDatabaseTransaction
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
SQLTransaction< LoginDatabaseConnection > LoginDatabaseTransaction
std::future< QueryResult > QueryResultFuture
std::shared_ptr< ResultSet > QueryResult
std::shared_ptr< Transaction< T > > SQLTransaction
std::shared_ptr< PreparedResultSet > PreparedQueryResult
std::promise< void > QueryResultHolderPromise
std::future< bool > TransactionFuture
std::future< void > QueryResultHolderFuture
Class used to access individual fields of database query result.
Definition: Field.h:90