MidgardQueryExecutor

MidgardQueryExecutor

Synopsis

                    MidgardQueryExecutor;
struct              MidgardQueryExecutorClass;
gboolean            midgard_query_executor_set_constraint
                                                        (MidgardQueryExecutor *self,
                                                         MidgardQueryConstraintSimple *constraint);
gboolean            midgard_query_executor_set_limit    (MidgardQueryExecutor *self,
                                                         guint limit);
gboolean            midgard_query_executor_set_offset   (MidgardQueryExecutor *self,
                                                         guint offset);
gboolean            midgard_query_executor_add_order    (MidgardQueryExecutor *self,
                                                         MidgardQueryHolder *holder,
                                                         const gchar *type);
gboolean            midgard_query_executor_add_join     (MidgardQueryExecutor *self,
                                                         const gchar *join_type,
                                                         MidgardQueryHolder *left_holder,
                                                         MidgardQueryHolder *right_holder);
guint               midgard_query_executor_get_results_count
                                                        (MidgardQueryExecutor *self);

Object Hierarchy

  GObject
   +----MidgardQueryExecutor
         +----MidgardQuerySelect
         +----MidgardSqlQuerySelectData

Implemented Interfaces

MidgardQueryExecutor implements MidgardExecutable.

Properties

  "constraint"               MidgardQueryConstraintSimple*  : Read
  "resultscount"             guint                 : Read

Signals

  "execution-end"                                  : No Hooks
  "execution-start"                                : No Hooks

Description

Details

MidgardQueryExecutor

typedef struct _MidgardQueryExecutor MidgardQueryExecutor;


struct MidgardQueryExecutorClass

struct MidgardQueryExecutorClass {
	GObjectClass parent;

	/* virtual methods */
	gboolean (*set_constraint)		(MidgardQueryExecutor *self, MidgardQueryConstraintSimple *constraint);
	gboolean (*set_limit)			(MidgardQueryExecutor *self, guint limit);
	gboolean (*set_offset)			(MidgardQueryExecutor *self, guint offset);
	gboolean (*add_order)			(MidgardQueryExecutor *self, MidgardQueryHolder *holder, const gchar *type);
	gboolean        (*add_join)			(MidgardQueryExecutor *self, const gchar *join_type, 
								MidgardQueryHolder *left_holder, MidgardQueryHolder *right_holder);
	guint 		(*get_results_count)		(MidgardQueryExecutor *self);

	/* signals */
	void            (*execution_start)      (GObject *object);
	void            (*execution_end)        (GObject *object);

	/* signals IDs */
	guint           signal_id_execution_start;
	guint           signal_id_execution_end;
};


midgard_query_executor_set_constraint ()

gboolean            midgard_query_executor_set_constraint
                                                        (MidgardQueryExecutor *self,
                                                         MidgardQueryConstraintSimple *constraint);

Set constraint object which will be used for query execution

self :

MidgardQueryExecutor instance

constraint :

MidgardQueryConstraintSimple instance

Returns :

TRUE on success, FALSE otherwise

Since 10.05


midgard_query_executor_set_limit ()

gboolean            midgard_query_executor_set_limit    (MidgardQueryExecutor *self,
                                                         guint limit);

self :

MidgardQueryExecutor instance

limit :

execution limit

Returns :

TRUE on success, FALSE otherwise

Since 10.05


midgard_query_executor_set_offset ()

gboolean            midgard_query_executor_set_offset   (MidgardQueryExecutor *self,
                                                         guint offset);

self :

MidgardQueryExecutor instance

offset :

execution offset

Returns :

TRUE on success, FALSE otherwise

Since 10.05


midgard_query_executor_add_order ()

gboolean            midgard_query_executor_add_order    (MidgardQueryExecutor *self,
                                                         MidgardQueryHolder *holder,
                                                         const gchar *type);

self :

MidgardQueryExecutor instance

holder :

MidgardQueryHolder instance

type :

execution order

Returns :

TRUE on success, FALSE otherwise

Since 10.05


midgard_query_executor_add_join ()

gboolean            midgard_query_executor_add_join     (MidgardQueryExecutor *self,
                                                         const gchar *join_type,
                                                         MidgardQueryHolder *left_holder,
                                                         MidgardQueryHolder *right_holder);


midgard_query_executor_get_results_count ()

guint               midgard_query_executor_get_results_count
                                                        (MidgardQueryExecutor *self);

self :

MidgardQueryExecutor instance

Returns :

number of objects or records returned from execution

Since 10.05

Property Details

The "constraint" property

  "constraint"               MidgardQueryConstraintSimple*  : Read

Constraint object which has been set to given executor instance


The "resultscount" property

  "resultscount"             guint                 : Read

Number of records matched in query.

Default value: 0

Signal Details

The "execution-end" signal

void                user_function                      (MidgardQueryExecutor *midgardqueryexecutor,
                                                        gpointer              user_data)                 : No Hooks

midgardqueryexecutor :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "execution-start" signal

void                user_function                      (MidgardQueryExecutor *midgardqueryexecutor,
                                                        gpointer              user_data)                 : No Hooks

midgardqueryexecutor :

the object which received the signal.

user_data :

user data set when the signal handler was connected.