GNOME Data Access manual |
---|
enum GdaCommandOptions; #define GDA_COMMAND_DEFAULT_OPTION enum GdaCommandType; typedef GdaCommand; GdaCommand* gda_command_new (const gchar *text, GdaCommandType type, GdaCommandOptions options); void gda_command_free (GdaCommand *cmd); const gchar* gda_command_get_text (GdaCommand *cmd); void gda_command_set_text (GdaCommand *cmd, const gchar *text); GdaCommandType gda_command_get_command_type (GdaCommand *cmd); void gda_command_set_command_type (GdaCommand *cmd, GdaCommandType type); GdaCommandOptions gda_command_get_options (GdaCommand *cmd); void gda_command_set_options (GdaCommand *cmd, GdaCommandOptions options); GdaTransaction* gda_command_get_transaction (GdaCommand *cmd); void gda_command_set_transaction (GdaCommand *cmd, GdaTransaction *xaction);
typedef enum { GDA_COMMAND_OPTION_IGNORE_ERRORS = 1, GDA_COMMAND_OPTION_STOP_ON_ERRORS = 1 << 1, GDA_COMMAND_OPTION_BAD_OPTION = 1 << 2 } GdaCommandOptions;
And OR'ed combination of GDA_COMMAND_OPTIONS_* values.
#define GDA_COMMAND_DEFAULT_OPTION GDA_COMMAND_OPTION_IGNORE_ERRORS
This value is the one set by default. Currently is equal to GDA_COMMAND_OPTION_STOP_ON_ERRORS.
typedef enum { GDA_COMMAND_TYPE_SQL, GDA_COMMAND_TYPE_XML, GDA_COMMAND_TYPE_PROCEDURE, GDA_COMMAND_TYPE_TABLE, GDA_COMMAND_TYPE_SCHEMA, GDA_COMMAND_TYPE_INVALID } GdaCommandType;
GDA_COMMAND_TYPE_SQL | the text of the command is composed of zero or more SQL sentences. |
GDA_COMMAND_TYPE_XML | |
GDA_COMMAND_TYPE_PROCEDURE | |
GDA_COMMAND_TYPE_TABLE | the text of the command is composed of zero or more table names. |
GDA_COMMAND_TYPE_SCHEMA | |
GDA_COMMAND_TYPE_INVALID |
typedef struct { gchar *text; GdaCommandType type; GdaCommandOptions options; GdaTransaction *xaction; } GdaCommand;
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. |
Returns : | a newly allocated GdaCommand. |
void gda_command_free (GdaCommand *cmd);
Frees the resources allocated by gda_command_new.
cmd : | a GdaCommand. |
const gchar* gda_command_get_text (GdaCommand *cmd);
Get the command text held by cmd.
cmd : | a GdaCommand. |
Returns : | the command string of cmd. |
void gda_command_set_text (GdaCommand *cmd, const gchar *text);
Sets the command text of cmd.
cmd : | |
text : | the command text. |
GdaCommandType gda_command_get_command_type (GdaCommand *cmd);
Gets the command type of cmd.
cmd : | a GdaCommand. |
Returns : | the command type of cmd. |
void gda_command_set_command_type (GdaCommand *cmd, GdaCommandType type);
Sets the command type of cmd.
cmd : | |
type : | the command type. |
GdaCommandOptions gda_command_get_options (GdaCommand *cmd);
Gets the command options of cmd.
cmd : | a GdaCommand. |
Returns : | the command options of cmd. |
void gda_command_set_options (GdaCommand *cmd, GdaCommandOptions options);
Sets the command options of cmd. If there conflicting options, it will just leave the value as before.
cmd : | |
options : | the command options. |
GdaTransaction* gda_command_get_transaction (GdaCommand *cmd);
Get the GdaTransaction associated with the given GdaCommand.
cmd : | a GdaCommand. |
Returns : | the transaction for the command. |
void gda_command_set_transaction (GdaCommand *cmd, GdaTransaction *xaction);
Set the GdaTransaction associated with the given GdaCommand.
cmd : | a GdaCommand. |
xaction : | a GdaTransaction object. |
<<< GdaClient | gda-config >>> |