![]() |
![]() |
![]() |
GNOME Data Access 3.0 manual | ![]() |
---|---|---|---|---|
GdaQueryTarget; GdaQueryTarget* gda_query_target_new (GdaQuery *query, const gchar *table); GdaQueryTarget* gda_query_target_new_copy (GdaQueryTarget *orig); GdaQuery* gda_query_target_get_query (GdaQueryTarget *target); const gchar* gda_query_target_get_represented_table_name (GdaQueryTarget *target); GdaEntity* gda_query_target_get_represented_entity (GdaQueryTarget *target); void gda_query_target_set_alias (GdaQueryTarget *target, const gchar *alias); const gchar* gda_query_target_get_alias (GdaQueryTarget *target); gchar* gda_query_target_get_complete_name (GdaQueryTarget *target);
"entity" GdaEntity* : Read / Write "entity-id" gchar* : Write "entity-name" gchar* : Write "query" GdaQuery* : Read / Write / Construct Only
A GdaQueryTarget object represents an entity (usually a table, as a GdaDictTable) which is taking part in a query. For SELECT queries, the targets are the entities listed after the FROM clause; for the INSERT, DELETE and UPDATE queries, there is only one target which is the entity to which the modifications apply.
Within a single SELECT query, there can be more than one GdaQueryTarget object representing the same entity for queries making usage of an entity more than one time.
It implements the GdaXmlStorage, GdaReferer and GdaRenderer interfaces.
typedef struct _GdaQueryTarget GdaQueryTarget;
GdaQueryTarget
is deprecated and should not be used in newly-written code.
GdaQueryTarget* gda_query_target_new (GdaQuery *query, const gchar *table);
gda_query_target_new
is deprecated and should not be used in newly-written code.
Creates a new GdaQueryTarget object, specifying the name of the table to reference.
|
a GdaQuery object |
|
the name of the table to reference |
Returns : |
the new object |
GdaQueryTarget* gda_query_target_new_copy (GdaQueryTarget *orig);
gda_query_target_new_copy
is deprecated and should not be used in newly-written code.
Makes a copy of an existing object (copy constructor)
|
a GdaQueryTarget object to copy |
Returns : |
the new object |
GdaQuery* gda_query_target_get_query (GdaQueryTarget *target);
gda_query_target_get_query
is deprecated and should not be used in newly-written code.
Get the GdaQuery in which target
is
|
a GdaQueryTarget object |
Returns : |
the GdaQuery object |
const gchar* gda_query_target_get_represented_table_name (GdaQueryTarget *target);
gda_query_target_get_represented_table_name
is deprecated and should not be used in newly-written code.
Get the table name represented by target
|
a GdaQueryTarget object |
Returns : |
the table name or NULL if target does not represent a database table
|
GdaEntity* gda_query_target_get_represented_entity (GdaQueryTarget *target);
gda_query_target_get_represented_entity
is deprecated and should not be used in newly-written code.
Get the GdaEntity object which is represented by target
|
a GdaQueryTarget object |
Returns : |
the GdaEntity object or NULL if target is not active
|
void gda_query_target_set_alias (GdaQueryTarget *target, const gchar *alias);
gda_query_target_set_alias
is deprecated and should not be used in newly-written code.
Sets target
's alias to alias
|
a GdaQueryTarget object |
|
the alias |
const gchar* gda_query_target_get_alias (GdaQueryTarget *target);
gda_query_target_get_alias
is deprecated and should not be used in newly-written code.
Get target
's alias
|
a GdaQueryTarget object |
Returns : |
the alias |
gchar* gda_query_target_get_complete_name (GdaQueryTarget *target);
gda_query_target_get_complete_name
is deprecated and should not be used in newly-written code.
Get a complete name for target in the form of "<entity name> AS <target alias>"
|
a GdaQueryTarget object |
Returns : |
a new string |