Batch Jobs

The client library provides a very interesting object: the Gda_Batch object, which is an abstract class which allows you to treat a series of commands as a unique entity. It offers this feature along with a real transaction support (if the underlying database supports it). All changes made to the database are committed if no error is found, whereas the execution is cancelled (and all changes discarded) if an error is returned from the database. This model lets you provide transaction-like support in your applications with just a few lines of code.

But, the Gda_Batch object is flexible enough to be used as a simple batch job, ignoring errors if this fits your needs, and disabling database transactions. In this case, the best way to use the object is to connect to it's different signals, which let you know at any moment the status of each command's execution.