Gnome::Gda::QueryTarget Class Reference

Represents a target entity within a query. More...

#include <querytarget.h>

Inheritance diagram for Gnome::Gda::QueryTarget:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~QueryTarget ()
GdaQueryTarget* gobj ()
 Provides access to the underlying C GObject.
const GdaQueryTarget* gobj () const
 Provides access to the underlying C GObject.
GdaQueryTarget* 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<QueryTargetcopy () const
 Makes a copy of an existing object (copy constructor).
Glib::RefPtr<Queryget_query ()
 Get the Gda::Query in which target is.
Glib::RefPtr<const Queryget_query () const
 Get the Gda::Query in which target is.
Glib::RefPtr<Entityget_represented_entity ()
 Get the Gda::Entity object which is represented by target.
Glib::RefPtr<const Entityget_represented_entity () const
 Get the Gda::Entity object which is represented by target.
Glib::ustring get_represented_table_name () const
 Get the table name represented by target.
void set_alias (const Glib::ustring& alias)
 Sets target 's alias to alias.
Glib::ustring get_alias () const
 Get target 's alias.
Glib::ustring get_complete_name () const
 Get a complete name for target in the form of "&lt;entity name&gt; AS &lt;target alias&gt;".

Static Public Member Functions

static Glib::RefPtr<QueryTargetcreate (const Glib::RefPtr<Query>& query, const Glib::ustring& table)

Protected Member Functions

 QueryTarget (const Glib::RefPtr<Query>& query, const Glib::ustring& table)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Gda::QueryTargetwrap (GdaQueryTarget* object, bool take_copy=false)

Detailed Description

Represents a target entity within a query.

A QueryTarget object represents an entity (usually a table, as a DictTable) which is taking part in a query. For SELECT queries, the targets are the entities listed after the FROM clause; for the INSERT, DELETE and UPDATE queries, there is only one target which is the entity to which the modifications apply.

Within a single SELECT query, there can be more than one QueryTarget object representing the same entity for queries making usage of an entity more than one time.


Constructor & Destructor Documentation

virtual Gnome::Gda::QueryTarget::~QueryTarget (  )  [virtual]

Gnome::Gda::QueryTarget::QueryTarget ( const Glib::RefPtr<Query>&  query,
const Glib::ustring table 
) [protected]


Member Function Documentation

Glib::RefPtr<QueryTarget> Gnome::Gda::QueryTarget::copy (  )  const

Makes a copy of an existing object (copy constructor).

Returns:
The new object.

static Glib::RefPtr<QueryTarget> Gnome::Gda::QueryTarget::create ( const Glib::RefPtr<Query>&  query,
const Glib::ustring table 
) [static]

Glib::ustring Gnome::Gda::QueryTarget::get_alias (  )  const

Get target 's alias.

Returns:
The alias.

Glib::ustring Gnome::Gda::QueryTarget::get_complete_name (  )  const

Get a complete name for target in the form of "&lt;entity name&gt; AS &lt;target alias&gt;".

Returns:
A new string.

Glib::RefPtr<const Query> Gnome::Gda::QueryTarget::get_query (  )  const

Get the Gda::Query in which target is.

Returns:
The Gda::Query object.

Glib::RefPtr<Query> Gnome::Gda::QueryTarget::get_query (  ) 

Get the Gda::Query in which target is.

Returns:
The Gda::Query object.

Glib::RefPtr<const Entity> Gnome::Gda::QueryTarget::get_represented_entity (  )  const

Get the Gda::Entity object which is represented by target.

Returns:
The Gda::Entity object or 0 if target is not active.

Glib::RefPtr<Entity> Gnome::Gda::QueryTarget::get_represented_entity (  ) 

Get the Gda::Entity object which is represented by target.

Returns:
The Gda::Entity object or 0 if target is not active.

Glib::ustring Gnome::Gda::QueryTarget::get_represented_table_name (  )  const

Get the table name represented by target.

Returns:
The table name or 0 if target does not represent a database table.

const GdaQueryTarget* Gnome::Gda::QueryTarget::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::QueryObject.

GdaQueryTarget* Gnome::Gda::QueryTarget::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::QueryObject.

GdaQueryTarget* Gnome::Gda::QueryTarget::gobj_copy (  ) 

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

Reimplemented from Gnome::Gda::QueryObject.

void Gnome::Gda::QueryTarget::set_alias ( const Glib::ustring alias  ) 

Sets target 's alias to alias.

Parameters:
alias The alias.


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::QueryTarget> wrap ( GdaQueryTarget *  object,
bool  take_copy = false 
) [related]

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:
Generated on Sat Feb 10 20:06:42 2007 for libgdamm by  doxygen 1.4.7