Midgard2 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
MidgardQuerySelect; struct MidgardQuerySelectClass; MidgardQuerySelect * midgard_query_select_new (MidgardConnection *mgd
,MidgardQueryStorage *storage
); MidgardDBObject ** midgard_query_select_list_objects (MidgardQuerySelect *self
,guint *n_objects
); void midgard_query_select_toggle_read_only (MidgardQuerySelect *self
,gboolean toggle
); void midgard_query_select_include_deleted (MidgardQuerySelect *self
,gboolean toggle
);
"connection" MidgardConnection* : Write / Construct Only "storage" MidgardQueryStorage* : Read / Write / Construct Only
struct MidgardQuerySelectClass { MidgardQueryExecutorClass parent; MidgardDBObject **(*list_objects) (MidgardQuerySelect *self, guint *n_objects); void (*toggle_read_only) (MidgardQuerySelect *self, gboolean toggle); void (*include_deleted) (MidgardQuerySelect *self, gboolean toggle); };
MidgardQuerySelect * midgard_query_select_new (MidgardConnection *mgd
,MidgardQueryStorage *storage
);
MidgardStorage storage
represents storage which is queried during execution
By default, for performance reason, MidgardQuerySelect is instantiated in read only mode.
See: midgard_query_select_toggle_read_only()
.
|
MidgardConnection instance |
|
MidgardStorage instance |
Returns : |
new MidgardQuerySelect instance or NULL on failure |
Since 10.05
MidgardDBObject ** midgard_query_select_list_objects (MidgardQuerySelect *self
,guint *n_objects
);
List all objects for which data has been returned during execution.
|
MidgardQuerySelect instance |
|
pointer to store number of returned objects |
Returns : |
newly allocated array of MidgardDBObject. [element-type MidgardDBObject][array length=n_objects][transfer full] |
Since 10.05
void midgard_query_select_toggle_read_only (MidgardQuerySelect *self
,gboolean toggle
);
This method switch MidgardQuerySelect to read only mode. It should be enabled when returned objects will be used only to read properties. It improves performance, but it's impossible to write returned object's properties.
By default, for performance reason, MidgardQuerySelect is instantiated in read only mode.
|
MidgardQuerySelect instance |
|
enables or disables read only mode |
Since 10.05
void midgard_query_select_include_deleted (MidgardQuerySelect *self
,gboolean toggle
);
By default, MidgardQuerySelect ignores deleted objects.
With this method, you can set deleted objects toggle, so such can be
included in execute results. This method may be called as many times
as needed, to include (TRUE
) or exclude (FALSE
) deleted objects.
This is valid only for those classes which has 'metadata' (of MidgardMetadata type) or 'deleted' property installed.
|
MidgardQuerySelect instance |
|
toggle to include or exclude deleted objects |
Since 10.05.1
"connection"
property"connection" MidgardConnection* : Write / Construct Only
Pointer for a connection, MidgardQuerySelect has been initialized for
"storage"
property"storage" MidgardQueryStorage* : Read / Write / Construct Only
Pointer for a connection, MidgardQuerySelect has been initialized for