![]() | ![]() | ![]() | libgda API reference | ![]() |
---|
GdaBatch* gda_batch_new (void); void gda_batch_free (GdaBatch *job); gboolean gda_batch_load_file (GdaBatch *job, const gchar *filename, gboolean clean); void gda_batch_add_command (GdaBatch *job, const gchar *cmd); void gda_batch_clear (GdaBatch *job); gboolean gda_batch_start (GdaBatch *job); void gda_batch_stop (GdaBatch *job); gboolean gda_batch_is_running (GdaBatch *job); GdaConnection* gda_batch_get_connection (GdaBatch *job); void gda_batch_set_connection (GdaBatch *job, GdaConnection *cnc); gboolean gda_batch_get_transaction_mode (GdaBatch *job); void gda_batch_set_transaction_mode (GdaBatch *job, gboolean mode);
The GdaBatch object provides a way of easily adding transactions to your applications. It allows you to reference a set of commands as a unique entity (a batch job).
GdaBatch* gda_batch_new (void);
Creates a new
Although, this behavior is configurable. You can also use it as a way of sending several commands to the underlying database, regardless of the errors found in the process.
Returns : | a pointer to the new object, or NULL on error |
void gda_batch_free (GdaBatch *job);
Destroy the given batch job object
job : | a |
gboolean gda_batch_load_file (GdaBatch *job, const gchar *filename, gboolean clean);
Load the given file as a set of commands into the given job
object.
The clean
parameter specifies whether to clean up the list of commands
before loading the given file or not.
job : | a |
filename : | file name |
clean : | clean up |
Returns : | TRUE if successful, or FALSE on error |
void gda_batch_add_command (GdaBatch *job, const gchar *cmd);
Adds a command to the list of commands to be executed
job : | a |
cmd : | command string |
void gda_batch_clear (GdaBatch *job);
Clears the given
job : |
|
gboolean gda_batch_start (GdaBatch *job);
Start the batch job execution. This function will return when the series of commands is completed, or when an error is found
job : | a |
Returns : | TRUE if all goes well, or FALSE on error |
void gda_batch_stop (GdaBatch *job);
Stop the execution of the given
job : | a |
gboolean gda_batch_is_running (GdaBatch *job);
job : | a |
Returns : |
|
GdaConnection* gda_batch_get_connection (GdaBatch *job);
Return the
job : | a |
Returns : |
|
void gda_batch_set_connection (GdaBatch *job, GdaConnection *cnc);
Associate a
job : | a |
cnc : | a |
gboolean gda_batch_get_transaction_mode (GdaBatch *job);
job : | a |
Returns : | the transaction mode for the given |
<<< GDA Client Library API Reference | GdaCommand >>> |