00001 /* 00002 * Copyright (C) 2006 Piotr Pokora <piotrek.pokora@gmail.com> 00003 * 00004 * This program is free software; you can redistribute it and/or modify it 00005 * under the terms of the GNU Lesser General Public License as published 00006 * by the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 */ 00018 00019 #ifndef MIDGARD_CORE_QB_H 00020 #define MIDGARD_CORE_QB_H 00021 00022 #include "midgard/types.h" 00023 #include "midgard/midgard_collector.h" 00024 00034 /* 00035 * \ingroup core_qb 00036 * 00037 * Query builder "modes" 00038 * 00039 * MQB_SELECT_OBJECT, Select all objects' data from database 00040 * MQB_SELECT_GUID, Select only objects' guids 00041 * MQB_SELECT_FIELD, Select only particular fields 00042 * MQB_SELECT_COUNT, Count results 00043 */ 00044 #define MQB_SELECT_OBJECT 0 00045 #define MQB_SELECT_GUID 1 00046 #define MQB_SELECT_FIELD 2 00047 #define MQB_SELECT_COUNT 3 00048 00061 extern void _midgard_core_qb_add_table( 00062 MidgardQueryBuilder *builder, const gchar *table); 00063 00078 extern gchar *_midgard_core_qb_get_sql( 00079 MidgardQueryBuilder *builder, guint mode, gchar *select); 00080 00081 #endif /* MIDGARD_CORE_QB_H */
1.4.6