Updated Copyright year to 2013
[getmangos.git] / src / shared / Database / DatabaseEnv.h
blobabcd97c44bf27715fb51b03ec13b1246b41b43fe
1 /*
2 * Copyright (C) 2005-2013 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/Field.h"
27 #include "Database/QueryResult.h"
29 #ifdef DO_POSTGRESQL
30 #include "Database/QueryResultPostgre.h"
31 #include "Database/Database.h"
32 #include "Database/DatabasePostgre.h"
33 typedef DatabasePostgre DatabaseType;
34 #define _LIKE_ "ILIKE"
35 #define _TABLE_SIM_ "\""
36 #define _CONCAT3_(A,B,C) "( " A " || " B " || " C " )"
37 #define _OFFSET_ "LIMIT 1 OFFSET %d"
38 #else
39 #include "Database/QueryResultMysql.h"
40 #include "Database/Database.h"
41 #include "Database/DatabaseMysql.h"
42 typedef DatabaseMysql DatabaseType;
43 #define _LIKE_ "LIKE"
44 #define _TABLE_SIM_ "`"
45 #define _CONCAT3_(A,B,C) "CONCAT( " A " , " B " , " C " )"
46 #define _OFFSET_ "LIMIT %d,1"
47 #endif
49 extern DatabaseType WorldDatabase;
50 extern DatabaseType CharacterDatabase;
51 extern DatabaseType LoginDatabase;
53 #endif