Top | ![]() |
![]() |
![]() |
![]() |
GdaCommand * | gda_command_new () |
void | gda_command_free () |
GdaCommand * | gda_command_copy () |
const gchar * | gda_command_get_text () |
void | gda_command_set_text () |
GdaCommandType | gda_command_get_command_type () |
void | gda_command_set_command_type () |
GdaCommandOptions | gda_command_get_options () |
void | gda_command_set_options () |
The GdaCommand structure holds data needed to issue a command to the providers. Applications usually create a GdaCommand (via gda_command_new), set its properties (via the gda_command_set_* functions) and pass it over to the database using the GdaConnection functions.
GdaCommand commands can only be plain SQL without any variable in it, they are however very easy to use. For prepared statements and/or usage of variables in SQL statements, use a GdaQuery object.
GdaCommand * gda_command_new (const gchar *text
,GdaCommandType type
,GdaCommandOptions options
);
Creates a new GdaCommand from the parameters that should be freed by calling gda_command_free.
If there are conflicting options, this will set options
to
GDA_COMMAND_OPTION_DEFAULT.
text |
the text of the command. |
|
type |
a GdaCommandType value. |
|
options |
a GdaCommandOptions value. |
void
gda_command_free (GdaCommand *cmd
);
Frees the resources allocated by gda_command_new.
GdaCommand *
gda_command_copy (GdaCommand *cmd
);
Creates a new GdaCommand from an existing one.
const gchar *
gda_command_get_text (GdaCommand *cmd
);
Gets the command text held by cmd
.
void gda_command_set_text (GdaCommand *cmd
,const gchar *text
);
Sets the command text of cmd
.
GdaCommandType
gda_command_get_command_type (GdaCommand *cmd
);
Gets the command type of cmd
.
void gda_command_set_command_type (GdaCommand *cmd
,GdaCommandType type
);
Sets the command type of cmd
.
GdaCommandOptions
gda_command_get_options (GdaCommand *cmd
);
Gets the command options of cmd
.
void gda_command_set_options (GdaCommand *cmd
,GdaCommandOptions options
);
Sets the command options of cmd
.