libgdamm Reference Documentation |
Inheritance diagram for Gnome::Gda::QueryJoin:
Public Member Functions | |
Glib::RefPtr<const QueryCondition> | get_condition () const |
Get the join's associated condition. | |
Glib::RefPtr<QueryCondition> | get_condition () |
Get the join's associated condition. | |
QueryJoinType | get_join_type () const |
Get the type of a join. | |
Glib::RefPtr<const Query> | get_query () const |
Get the Gda::Query to which join is attached to. | |
Glib::RefPtr<Query> | get_query () |
Get the Gda::Query to which join is attached to. | |
Glib::RefPtr<const QueryTarget> | get_target_1 () const |
Get the 1st Gda::QueryTarget participating in the join. | |
Glib::RefPtr<QueryTarget> | get_target_1 () |
Get the 1st Gda::QueryTarget participating in the join. | |
Glib::RefPtr<const QueryTarget> | get_target_2 () const |
Get the 2nd Gda::QueryTarget participating in the join. | |
Glib::RefPtr<QueryTarget> | get_target_2 () |
Get the 2nd Gda::QueryTarget participating in the join. | |
const GdaQueryJoin* | gobj () const |
Provides access to the underlying C GObject. | |
GdaQueryJoin* | gobj () |
Provides access to the underlying C GObject. | |
GdaQueryJoin* | 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<Query >> | property_query () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<QueryTarget >> | property_target1 () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy< Glib::RefPtr< QueryTarget > > | property_target1 () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_WriteOnly< Glib::ustring > | property_target1_id () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<QueryTarget >> | property_target2 () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy< Glib::RefPtr< QueryTarget > > | property_target2 () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_WriteOnly< Glib::ustring > | property_target2_id () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::ustring | render_type () const |
Get the SQL version of the join type ("INNER JOIN", "LEFT JOIN", etc). | |
bool | set_condition (const Glib::RefPtr<QueryCondition>& cond) |
Sets cond to be join's condition. | |
bool | set_condition_from_fkcons () |
Creates a Gda::QueryCondition for join using the foreign key constraints present in the database if the two targets join joins are database tables (Gda::DictTable objects). | |
bool | set_condition_from_sql (const Glib::ustring& cond) |
Parses cond and if it represents a valid SQL expression to be join's condition, then set it to be join's condition. | |
void | set_join_type (QueryJoinType type) |
Sets the type of join. | |
Glib::SignalProxy0<void> | signal_condition_changed () |
| |
Glib::SignalProxy0<void> | signal_type_changed () |
| |
void | swap_targets () |
Changes the relative roles of the two Gda::QueryTarget objects. | |
virtual | ~QueryJoin () |
Static Public Member Functions | |
static Glib::RefPtr<QueryJoin> | create (const Glib::RefPtr<Query>& query, const Glib::ustring& target_1_xml_id, const Glib::ustring& target_2_xml_id) |
static Glib::RefPtr<QueryJoin> | create (const Glib::RefPtr<Query>& query, const Glib::RefPtr<QueryTarget>& target_1, const Glib::RefPtr<QueryTarget>& target_2) |
Protected Member Functions | |
virtual void | on_condition_changed () |
virtual void | on_type_changed () |
QueryJoin (const Glib::RefPtr<Query>& query, const Glib::ustring& target_1_xml_id, const Glib::ustring& target_2_xml_id) | |
QueryJoin (const Glib::RefPtr<Query>& query, const Glib::RefPtr<QueryTarget>& target_1, const Glib::RefPtr<QueryTarget>& target_2) | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Gnome::Gda::QueryJoin> | wrap (GdaQueryJoin* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
It is important to specify joining conditions as joins and not simply as WHERE conditions because the joins carry more information than a simple condition and because some features of Libmergeant rely on the joins analysis.
virtual Gnome::Gda::QueryJoin::~QueryJoin | ( | ) | [virtual] |
Gnome::Gda::QueryJoin::QueryJoin | ( | const Glib::RefPtr<Query>& | query, | |
const Glib::RefPtr<QueryTarget>& | target_1, | |||
const Glib::RefPtr<QueryTarget>& | target_2 | |||
) | [protected] |
Gnome::Gda::QueryJoin::QueryJoin | ( | const Glib::RefPtr<Query>& | query, | |
const Glib::ustring & | target_1_xml_id, | |||
const Glib::ustring & | target_2_xml_id | |||
) | [protected] |
static Glib::RefPtr<QueryJoin> Gnome::Gda::QueryJoin::create | ( | const Glib::RefPtr<Query>& | query, | |
const Glib::ustring & | target_1_xml_id, | |||
const Glib::ustring & | target_2_xml_id | |||
) | [static] |
static Glib::RefPtr<QueryJoin> Gnome::Gda::QueryJoin::create | ( | const Glib::RefPtr<Query>& | query, | |
const Glib::RefPtr<QueryTarget>& | target_1, | |||
const Glib::RefPtr<QueryTarget>& | target_2 | |||
) | [static] |
Glib::RefPtr<const QueryCondition> Gnome::Gda::QueryJoin::get_condition | ( | ) | const |
Glib::RefPtr<QueryCondition> Gnome::Gda::QueryJoin::get_condition | ( | ) |
QueryJoinType Gnome::Gda::QueryJoin::get_join_type | ( | ) | const |
Get the type of a join.
Glib::RefPtr<const Query> Gnome::Gda::QueryJoin::get_query | ( | ) | const |
Glib::RefPtr<Query> Gnome::Gda::QueryJoin::get_query | ( | ) |
Glib::RefPtr<const QueryTarget> Gnome::Gda::QueryJoin::get_target_1 | ( | ) | const |
Glib::RefPtr<QueryTarget> Gnome::Gda::QueryJoin::get_target_1 | ( | ) |
Glib::RefPtr<const QueryTarget> Gnome::Gda::QueryJoin::get_target_2 | ( | ) | const |
Glib::RefPtr<QueryTarget> Gnome::Gda::QueryJoin::get_target_2 | ( | ) |
const GdaQueryJoin* Gnome::Gda::QueryJoin::gobj | ( | ) | const [inline] |
GdaQueryJoin* Gnome::Gda::QueryJoin::gobj | ( | ) | [inline] |
GdaQueryJoin* Gnome::Gda::QueryJoin::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.
virtual void Gnome::Gda::QueryJoin::on_condition_changed | ( | ) | [protected, virtual] |
virtual void Gnome::Gda::QueryJoin::on_type_changed | ( | ) | [protected, virtual] |
Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Query>> Gnome::Gda::QueryJoin::property_query | ( | ) | const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::RefPtr<QueryTarget>> Gnome::Gda::QueryJoin::property_target1 | ( | ) | const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::RefPtr<QueryTarget>> Gnome::Gda::QueryJoin::property_target1 | ( | ) |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_WriteOnly<Glib::ustring> Gnome::Gda::QueryJoin::property_target1_id | ( | ) |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::RefPtr<QueryTarget>> Gnome::Gda::QueryJoin::property_target2 | ( | ) | const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::RefPtr<QueryTarget>> Gnome::Gda::QueryJoin::property_target2 | ( | ) |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_WriteOnly<Glib::ustring> Gnome::Gda::QueryJoin::property_target2_id | ( | ) |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::ustring Gnome::Gda::QueryJoin::render_type | ( | ) | const |
Get the SQL version of the join type ("INNER JOIN", "LEFT JOIN", etc).
bool Gnome::Gda::QueryJoin::set_condition | ( | const Glib::RefPtr<QueryCondition>& | cond | ) |
Sets cond to be join's condition.
This is possible only if cond uses query fields which are either of type GdaQueryFieldField and reference one of the two targets which join uses, or any other query field type.
cond | A Gda::QueryCondition object, or 0 to remove the join's condition. |
true
if no error occurred. bool Gnome::Gda::QueryJoin::set_condition_from_fkcons | ( | ) |
Creates a Gda::QueryCondition for join using the foreign key constraints present in the database if the two targets join joins are database tables (Gda::DictTable objects).
If there is more than one FK constraint between the database tables, then no join is created, and the call returns false
.
true
if suitable foreign keys were found and a join condition has been created. bool Gnome::Gda::QueryJoin::set_condition_from_sql | ( | const Glib::ustring & | cond | ) |
Parses cond and if it represents a valid SQL expression to be join's condition, then set it to be join's condition.
cond | A SQL expression. |
true
on success. void Gnome::Gda::QueryJoin::set_join_type | ( | QueryJoinType | type | ) |
Sets the type of join.
type | The new type of join. |
Glib::SignalProxy0< void > Gnome::Gda::QueryJoin::signal_condition_changed | ( | ) |
void on_my_condition_changed()
Glib::SignalProxy0< void > Gnome::Gda::QueryJoin::signal_type_changed | ( | ) |
void on_my_type_changed()
void Gnome::Gda::QueryJoin::swap_targets | ( | ) |
Changes the relative roles of the two Gda::QueryTarget objects.
It does not change the join condition itself, and is usefull only for the internals of the Gda::Query object
Glib::RefPtr<Gnome::Gda::QueryJoin> wrap | ( | GdaQueryJoin * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
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. |