# Gnome::Gda::Batch Class Reference
[Data Handlers]

Multiple SQL statements grouped together. More...

Inherits Glib::Object.

Collaboration diagram for Gnome::Gda::Batch:
[legend]

List of all members.

## Public Types
typedef Glib::SListHandle < Glib::RefPtr< const Statement > > | StatementSList
## Public Member Functions
virtual | ~Batch ()
GdaBatch* | gobj ()
| Provides access to the underlying C GObject.
const GdaBatch* | gobj () const
| Provides access to the underlying C GObject.
GdaBatch* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr< Batch > | copy ()
| Copy constructor.
void | add_statement (const Glib::RefPtr< Statement >& stmt)
| Add stmt to the list of statements managed by batch.
void | remove_statement (const Glib::RefPtr< Statement >& stmt)
| Removes stmt from the list of statements managed by batch.
Glib::ustring | serialize () const
| Creates a string representing the contents of batch.
StatementSList | get_statements () const
| Get a list of the Gda::Statement objects contained in batch.
bool | get_parameters (Glib::RefPtr< Set >& out_params)
| Get a new Gda::Set object which groups all the execution parameters which stmt needs.
Glib::SignalProxy1< void, Glib::RefPtr< Statement > > | signal_changed ()
## Static Public Member Functions
static Glib::RefPtr< Batch > | create ()
## Protected Member Functions
| Batch ()
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gnome::Gda::Batch > | wrap (GdaBatch* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Multiple SQL statements grouped together.

The Gda::Batch object represents one or more SQL statements (as Gda::Statement objects) in a single object. A Gda::Batch can either be built "manually" by assembling together several Gda::Statement objects, or from an SQL string using a Gda::SqlParser object.

## Member Typedef Documentation

typedef Glib::SListHandle<Glib::RefPtr<const Statement> > Gnome::Gda::Batch::StatementSList

## Constructor & Destructor Documentation

virtual Gnome::Gda::Batch::~Batch | ( |  | ) | `[virtual]`

Gnome::Gda::Batch::Batch | ( |  | ) | `[protected]`

## Member Function Documentation

void Gnome::Gda::Batch::add_statement | ( | const Glib::RefPtr< Statement >& | stmt | ) |

Add stmt to the list of statements managed by batch.

A Gda::Statement object can be added multiple times to a Gda::Batch object.

Parameters:

  | stmt | A statement to add to batch's statements list.

Glib::RefPtr<Batch> Gnome::Gda::Batch::copy | ( |  | ) |

Copy constructor.

Returns:
  A the new copy of orig.

static Glib::RefPtr<Batch> Gnome::Gda::Batch::create | ( |  | ) | `[static]`

bool Gnome::Gda::Batch::get_parameters | ( | Glib::RefPtr< Set >& | out_params | ) |

Get a new Gda::Set object which groups all the execution parameters which stmt needs.

This new object is returned though out_params.

Note that if stmt does not need any parameter, then out_params is set to `0`.

Parameters:

  | out_params | A place to store a new Gda::Set object, or `0`.

Returns:
  `true` if no error occurred.

StatementSList Gnome::Gda::Batch::get_statements | ( |  | ) | const

Get a list of the Gda::Statement objects contained in batch.

Returns:
  A list of Gda::Statement which should not be modified.

const GdaBatch* Gnome::Gda::Batch::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GdaBatch* Gnome::Gda::Batch::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GdaBatch* Gnome::Gda::Batch::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

void Gnome::Gda::Batch::remove_statement | ( | const Glib::RefPtr< Statement >& | stmt | ) |

Removes stmt from the list of statements managed by batch.

If stmt is present several times in batch's statements' list, then only the first one is removed.

Parameters:

  | stmt | A statement to remove from batch's statements list.

Glib::ustring Gnome::Gda::Batch::serialize | ( |  | ) | const

Creates a string representing the contents of batch.

Returns:
  A string containing the serialized version of batch.

Glib::SignalProxy1< void,Glib::RefPtr<Statement> > Gnome::Gda::Batch::signal_changed | ( |  | ) |

Prototype:
  `void on_my_changed(Glib::RefPtr<Statement> stmt)`

## Friends And Related Function Documentation

Glib::RefPtr< Gnome::Gda::Batch > wrap | ( | GdaBatch * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- libgdamm/batch.h