libgdamm Reference Documentation |
Inheritance diagram for Gnome::Gda::DictConstraint:
Public Member Functions | ||||
bool | equal (const Glib::RefPtr<const DictConstraint>& cstr2) const | |||
Compares two Gda::DictConstraint objects to see if they are equal, without taking into account the name of the constraints or weather they are user or system defined. | ||||
void | fkey_get_actions (DictConstraintFkAction& on_update, DictConstraintFkAction& on_delete) | |||
Get the actions undertaken by the DBMS when some actions occur on the referenced data. | ||||
GSList* | fkey_get_fields () const | |||
Get the list of field pairs composing the foreign key constraint which cstr represents. | ||||
Glib::RefPtr<const DictTable> | fkey_get_ref_table () const | |||
Get the Gda::DictTable at the other end of the foreign key relation represented by this constraint. | ||||
Glib::RefPtr<DictTable> | fkey_get_ref_table () | |||
Get the Gda::DictTable at the other end of the foreign key relation represented by this constraint. | ||||
void | fkey_set_actions (DictConstraintFkAction on_update, DictConstraintFkAction on_delete) | |||
Sets the actions undertaken by the DBMS when some actions occur on the referenced data. | ||||
void | fkey_set_fields (const GSList* pairs) | |||
Sets the field pairs which make the foreign key represented by cstr . | ||||
DictConstraintType | get_constraint_type () const | |||
Get the type of constraint the cstr object represents. | ||||
Glib::RefPtr<const DictTable> | get_table () const | |||
Get the table to which the constraint is attached. | ||||
Glib::RefPtr<DictTable> | get_table () | |||
Get the table to which the constraint is attached. | ||||
const GdaDictConstraint* | gobj () const | |||
Provides access to the underlying C GObject. | ||||
GdaDictConstraint* | gobj () | |||
Provides access to the underlying C GObject. | ||||
GdaDictConstraint* | 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<const DictField> | not_null_get_field () const | |||
Glib::RefPtr<DictField> | not_null_get_field () | |||
void | not_null_set_field (const Glib::RefPtr<DictField>& field) | |||
GSList* | pkey_get_fields () | |||
Get the list of fields composing the primary key constraint which cstr represents. | ||||
void | pkey_set_fields (const GSList* fields) | |||
Sets the fields which make the primary key represented by cstr . | ||||
Glib::PropertyProxy_ReadOnly< bool > | property_user_constraint () const | |||
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | ||||
Glib::PropertyProxy<bool> | property_user_constraint () | |||
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | ||||
GSList* | unique_get_fields () const | |||
Get the list of fields represented by this UNIQUE constraint. | ||||
void | unique_set_fields (const GSList* fields) | |||
bool | uses_field (const Glib::RefPtr<const DictField>& field) const | |||
Tests if field is part of the cstr constraint. | ||||
virtual | ~DictConstraint () | |||
Static Public Member Functions | ||||
static Glib::RefPtr<DictConstraint> | create (const Glib::RefPtr<DictDatabase>& db) | |||
static Glib::RefPtr<DictConstraint> | create (const Glib::RefPtr<DictTable>& table, DictConstraintType type) | |||
Protected Member Functions | ||||
DictConstraint (const Glib::RefPtr<DictDatabase>& db) | ||||
DictConstraint (const Glib::RefPtr<DictTable>& table, DictConstraintType type) | ||||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Glib::RefPtr<Gnome::Gda::DictConstraint> | wrap (GdaDictConstraint* object, bool take_copy=false) | |||
|
Any type of constraint in a database is represented by one instance of this class (see the possible types of constraints). As some constraints may not depend exclusively on a table, all the constraints are attached to the database itself.
virtual Gnome::Gda::DictConstraint::~DictConstraint | ( | ) | [virtual] |
Gnome::Gda::DictConstraint::DictConstraint | ( | const Glib::RefPtr<DictTable>& | table, | |
DictConstraintType | type | |||
) | [explicit, protected] |
Gnome::Gda::DictConstraint::DictConstraint | ( | const Glib::RefPtr<DictDatabase>& | db | ) | [explicit, protected] |
static Glib::RefPtr<DictConstraint> Gnome::Gda::DictConstraint::create | ( | const Glib::RefPtr<DictDatabase>& | db | ) | [static] |
static Glib::RefPtr<DictConstraint> Gnome::Gda::DictConstraint::create | ( | const Glib::RefPtr<DictTable>& | table, | |
DictConstraintType | type | |||
) | [static] |
bool Gnome::Gda::DictConstraint::equal | ( | const Glib::RefPtr<const DictConstraint>& | cstr2 | ) | const |
Compares two Gda::DictConstraint objects to see if they are equal, without taking into account the name of the constraints or weather they are user or system defined.
cstr2 | The second Gda::DictConstraint to compare. |
true
if the two constraints are equal and false
otherwise. void Gnome::Gda::DictConstraint::fkey_get_actions | ( | DictConstraintFkAction& | on_update, | |
DictConstraintFkAction& | on_delete | |||
) |
Get the actions undertaken by the DBMS when some actions occur on the referenced data.
on_update | An address to store the action undertaken when an UPDATE occurs. | |
on_delete | An address to store the action undertaken when a DELETE occurs. |
GSList* Gnome::Gda::DictConstraint::fkey_get_fields | ( | ) | const |
Get the list of field pairs composing the foreign key constraint which cstr represents.
In the returned list, each pair item is allocated and it's up to the caller to free the list and each pair, and the reference count for each pointer to GObjects in each pair is NOT INCREASED, which means the caller of this function DOES NOT hold any reference on the mentionned GObjects (if he needs to, it has to call Glib::object_ref())
Glib::RefPtr<const DictTable> Gnome::Gda::DictConstraint::fkey_get_ref_table | ( | ) | const |
Get the Gda::DictTable at the other end of the foreign key relation represented by this constraint.
Glib::RefPtr<DictTable> Gnome::Gda::DictConstraint::fkey_get_ref_table | ( | ) |
Get the Gda::DictTable at the other end of the foreign key relation represented by this constraint.
void Gnome::Gda::DictConstraint::fkey_set_actions | ( | DictConstraintFkAction | on_update, | |
DictConstraintFkAction | on_delete | |||
) |
Sets the actions undertaken by the DBMS when some actions occur on the referenced data.
on_update | The action undertaken when an UPDATE occurs. | |
on_delete | The action undertaken when a DELETE occurs. |
void Gnome::Gda::DictConstraint::fkey_set_fields | ( | const GSList * | pairs | ) |
Sets the field pairs which make the foreign key represented by cstr .
All the field pairs must list a field which belong to the same Gda::DictTable to which the constraint is attached and a field which belongs to a Gda::DictTable which is different from the one just mentionned and which is within the same database. The pairs are of type Gda::DictConstraintFkeyPair.
pairs | A list of Gda::DictField objects. |
DictConstraintType Gnome::Gda::DictConstraint::get_constraint_type | ( | ) | const |
Get the type of constraint the cstr object represents.
Glib::RefPtr<const DictTable> Gnome::Gda::DictConstraint::get_table | ( | ) | const |
Glib::RefPtr<DictTable> Gnome::Gda::DictConstraint::get_table | ( | ) |
const GdaDictConstraint* Gnome::Gda::DictConstraint::gobj | ( | ) | const [inline] |
GdaDictConstraint* Gnome::Gda::DictConstraint::gobj | ( | ) | [inline] |
GdaDictConstraint* Gnome::Gda::DictConstraint::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::Object.
Glib::RefPtr<const DictField> Gnome::Gda::DictConstraint::not_null_get_field | ( | ) | const |
Glib::RefPtr<DictField> Gnome::Gda::DictConstraint::not_null_get_field | ( | ) |
void Gnome::Gda::DictConstraint::not_null_set_field | ( | const Glib::RefPtr<DictField>& | field | ) |
GSList* Gnome::Gda::DictConstraint::pkey_get_fields | ( | ) |
Get the list of fields composing the primary key constraint which cstr represents.
The returned list is allocated and must be de-allocated by the caller.
void Gnome::Gda::DictConstraint::pkey_set_fields | ( | const GSList * | fields | ) |
Sets the fields which make the primary key represented by cstr .
All the fields must belong to the same Gda::DictTable to which the constraint is attached
fields | A list of Gda::DictField objects. |
Glib::PropertyProxy_ReadOnly<bool> Gnome::Gda::DictConstraint::property_user_constraint | ( | ) | const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> Gnome::Gda::DictConstraint::property_user_constraint | ( | ) |
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
GSList* Gnome::Gda::DictConstraint::unique_get_fields | ( | ) | const |
Get the list of fields represented by this UNIQUE constraint.
It's up to the caller to free the list.
void Gnome::Gda::DictConstraint::unique_set_fields | ( | const GSList * | fields | ) |
bool Gnome::Gda::DictConstraint::uses_field | ( | const Glib::RefPtr<const DictField>& | field | ) | const |
Tests if field is part of the cstr constraint.
field | A Gda::DictField object. |
true
if cstr uses field .
Glib::RefPtr<Gnome::Gda::DictConstraint> wrap | ( | GdaDictConstraint * | object, | |
bool | take_copy = false | |||
) | [related] |
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. |