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(QUERYRESULTPOSTGRE_H)
20 #define QUERYRESULTPOSTGRE_H
23 #define FD_SETSIZE 1024
25 #include <postgre/libpq-fe.h>
26 #include <postgre/pg_type.h>
28 // Define OID's from pg_type.h in postgresql server includes.
35 #define INT2VECTOROID 22
43 #define OIDVECTOROID 30
48 #define POLYGONOID 604
52 #define ABSTIMEOID 702
53 #define RELTIMEOID 703
54 #define TINTERVALOID 704
55 #define UNKNOWNOID 705
60 #define BPCHAROID 1042
61 #define VARCHAROID 1043
64 #define TIMESTAMPOID 1114
65 #define TIMESTAMPTZOID 1184
66 #define INTERVALOID 1186
67 #define TIMETZOID 1266
69 #define VARBITOID 1562
70 #define NUMERICOID 1700
74 class QueryResultPostgre
: public QueryResult
77 QueryResultPostgre(PGresult
* result
, uint64 rowCount
, uint32 fieldCount
);
79 ~QueryResultPostgre();
81 bool NextRow() override
;
84 enum Field::DataTypes
ConvertNativeType(Oid pOid
) const;
85 void EndQuery() override
;