Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / src / shared / Database / DatabaseEnv.h
blob88cb0571002744cf30ba0bb8a0f4d14c33bcb8b4
1 /*
2 * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #if !defined(DATABASEENV_H)
20 #define DATABASEENV_H
22 #include "Common.h"
23 #include "Log.h"
24 #include "Errors.h"
26 #include "Database/DBCStores.h"
27 #include "Database/Field.h"
28 #include "Database/QueryResult.h"
30 #ifdef DO_POSTGRESQL
31 #include "Database/QueryResultPostgre.h"
32 #include "Database/Database.h"
33 #include "Database/DatabasePostgre.h"
34 typedef DatabasePostgre DatabaseType;
35 #define _LIKE_ "ILIKE"
36 #define _TABLE_SIM_ "\""
37 #define _CONCAT3_(A,B,C) "( " A " || " B " || " C " )"
38 #define _OFFSET_ "LIMIT 1 OFFSET %d"
39 #else
40 #include "Database/QueryResultMysql.h"
41 #include "Database/QueryResultSqlite.h"
42 #include "Database/Database.h"
43 #include "Database/DatabaseMysql.h"
44 #include "Database/DatabaseSqlite.h"
45 typedef DatabaseMysql DatabaseType;
46 #define _LIKE_ "LIKE"
47 #define _TABLE_SIM_ "`"
48 #define _CONCAT3_(A,B,C) "CONCAT( " A " , " B " , " C " )"
49 #define _OFFSET_ "LIMIT %d,1"
50 #endif
52 extern DatabaseType WorldDatabase;
53 extern DatabaseType CharacterDatabase;
54 extern DatabaseType loginDatabase;
56 #endif