| Libmergeant Reference Manual |
|---|
#define MG_QFIELD_TYPE #define MG_QFIELD (obj) #define IS_MG_QFIELD (obj) #define MG_QFIELD_CLASS (klass) struct MgQfield; guint mg_qfield_get_type (void); GObject* mg_qfield_new_from_xml (MgQuery *query, xmlNodePtr node, GError **error); GObject* mg_qfield_new_copy (MgQfield *orig); MgServerDataType* mg_qfield_get_data_type (MgQfield *qfield); GSList* mg_qfield_get_parameters (MgQfield *qfield); void mg_qfield_set_alias (MgQfield *qfield, const gchar *alias); const gchar* mg_qfield_get_alias (MgQfield *qfield); void mg_qfield_set_visible (MgQfield *qfield, gboolean visible); gboolean mg_qfield_is_visible (MgQfield *qfield); void mg_qfield_set_internal (MgQfield *qfield, gboolean internal); gboolean mg_qfield_is_internal (MgQfield *qfield); gboolean mg_qfield_is_equal (MgQfield *qfield1, MgQfield *qfield2); gboolean mg_qfield_is_list (MgQfield *qfield);
#define MG_QFIELD(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mg_qfield_get_type(), MgQfield)
| obj : |
|
#define IS_MG_QFIELD(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_qfield_get_type ())
| obj : |
|
#define MG_QFIELD_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mg_qfield_get_type (), MgQfieldClass)
| klass : |
|
GObject* mg_qfield_new_from_xml (MgQuery *query, xmlNodePtr node, GError **error);
This is an object factory which does create instances of class inheritants of the MgDfield class. Ths MgQfield object MUST then be attached to query
| query : | a MgQuery object |
| node : | an XML node corresponding to a <MG_QFIELD> tag |
| error : | location to store error, or NULL |
| Returns : | the newly created object |
GObject* mg_qfield_new_copy (MgQfield *orig);
This is a copy constructor
| orig : | a MgQfield to copy |
| Returns : | the new object |
MgServerDataType* mg_qfield_get_data_type (MgQfield *qfield);
Get the MgServerDataType represented by the qfield object: for a function it returns the return type, for a value, it returns its type, etc.
| qfield : | a MgQfield object |
| Returns : | the data type, or NULL if qfield does not have a data type. |
GSList* mg_qfield_get_parameters (MgQfield *qfield);
Get a list of all the parameters needed to qfield to be rendered as a valid statement
| qfield : | a MgQfield object |
| Returns : | a new list of parameters for qfield |
void mg_qfield_set_alias (MgQfield *qfield, const gchar *alias);
Sets qfield's alias
| qfield : | a MgQfield object |
| alias : | the alias to set qfield to |
const gchar* mg_qfield_get_alias (MgQfield *qfield);
Get qfield's alias
| qfield : | a MgQfield object |
| Returns : | the alias |
void mg_qfield_set_visible (MgQfield *qfield, gboolean visible);
Sets the visibility of qfield. A visible field will appear in the query's corresponding (virtual) entity, whereas a non visible one will be hidden (and possibly not taking part in the query).
| qfield : | a MgQfield object |
| visible : |
gboolean mg_qfield_is_visible (MgQfield *qfield);
| qfield : | a MgQfield object |
| Returns : | TRUE if field is visible |
void mg_qfield_set_internal (MgQfield *qfield, gboolean internal);
Sets weather qfield is internal or not. Internal fields in a query are fields added or changed by libmergeant itself, such fields may or may not be visible.
| qfield : | a MgQfield object |
| internal : |
gboolean mg_qfield_is_internal (MgQfield *qfield);
| qfield : | a MgQfield object |
| Returns : | TRUE if field is internal |
gboolean mg_qfield_is_equal (MgQfield *qfield1, MgQfield *qfield2);
Compares the qfield1 and qfield2. The name and aliases of the two fields are not compared, only the contents of the fields are.
| qfield1 : | a MgQfield object |
| qfield2 : | a MgQfield object |
| Returns : | TRUE if they are equal and FALSE otherwise |
| <<< Query fields | MgQfAll >>> |