libgdamm Reference Documentation

Main Page Namespaces Book

# Gnome::Gda::QueryTarget Class Reference

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

Inheritance diagram for Gnome::Gda::QueryTarget:

[legend]
List of all members.

## Public Member Functions

Glib::RefPtr<QueryTarget> | copy () const
| Makes a copy of an existing object (copy constructor).
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;".
Glib::RefPtr<const Query> | get_query () const
| Get the Gda::Query in which target is.
Glib::RefPtr<Query> | get_query ()
| Get the Gda::Query in which target is.
Glib::RefPtr<const Entity> | get_represented_entity () const
| Get the Gda::Entity object which is represented by target.
Glib::RefPtr<Entity> | get_represented_entity ()
| Get the Gda::Entity object which is represented by target.
Glib::ustring | get_represented_table_name () const
| Get the table name represented by target.
const GdaQueryTarget* | gobj () const
| Provides access to the underlying C GObject.
GdaQueryTarget* | gobj ()
| 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::PropertyProxy_ReadOnly< Glib::RefPtr<Entity >> | property_entity () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy< Glib::RefPtr< Entity > > | property_entity ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_WriteOnly< Glib::ustring > | property_entity_id ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_WriteOnly< Glib::ustring > | property_entity_name ()
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Query >> | property_query () const
| You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void | set_alias (const Glib::ustring& alias)
| Sets target's alias to alias.
virtual | ~QueryTarget ()

## Static Public Member Functions

static Glib::RefPtr<QueryTarget> | create (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::QueryTarget> | wrap (GdaQueryTarget* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## 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.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Entity>> Gnome::Gda::QueryTarget::property_entity | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::RefPtr<Entity>> Gnome::Gda::QueryTarget::property_entity | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly<Glib::ustring> Gnome::Gda::QueryTarget::property_entity_id | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_WriteOnly<Glib::ustring> Gnome::Gda::QueryTarget::property_entity_name | ( |  | ) |

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Query>> Gnome::Gda::QueryTarget::property_query | ( |  | ) | const

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

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]`

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:

- querytarget.h