kexi
KexiDB::IndexSchema Class Reference
#include <indexschema.h>
Inheritance diagram for KexiDB::IndexSchema:

Detailed Description
Provides information about database index that can be created for a database table.IndexSchema object stores information about table fields that defines this index and additional properties like: whether index is unique or primary key (requires unique). Single-field index can be also auto generated.
Definition at line 43 of file indexschema.h.
Constructor & Destructor Documentation
|
Constructs empty index schema object that is assigned to table, and will be owned by this table. Any fields added with addField() won't be owned by index, but by its table. Do not forget to add these fields to table, because adding these to IndexSchema is not enough. Definition at line 32 of file indexschema.cpp. |
|
Copy constructor. Definition at line 44 of file indexschema.cpp. |
|
Destroys the index. Field objects are not deleted. All Relationship objects listed in masterRelationships() list are destroyed (these are also detached from detail-side indices before destruction). Relationship objects listed in detailsRelationships() are not touched. Definition at line 61 of file indexschema.cpp. |
Member Function Documentation
|
Adds field at the end of field list. Field will not be owned by index. Field must belong to a table the index is bulit on, otherwise field couldn't be added. Reimplemented from KexiDB::FieldList. Definition at line 77 of file indexschema.cpp. |
|
Internal version of attachRelationship(). If ownedByMaster is true, attached rel object will be owned by this index. Definition at line 155 of file indexschema.cpp. |
|
Attaches relationship definition rel to this IndexSchema object. If rel relationship has this IndexSchema defined at the master-side, rel is added to the list of master relationships (available with masterRelationships()). If rel relationship has this IndexSchema defined at the details-side, rel is added to the list of details relationships (available with detailsRelationships()). For the former case, attached rel object is now owned by this IndexSchema object. Note: call detachRelationship() for IndexSchema object that rel was previously attached to, if any. Definition at line 150 of file indexschema.cpp. |
|
Reimplemented from KexiDB::FieldList. Definition at line 140 of file indexschema.cpp. |
|
Detaches relationship definition rel for this IndexSchema object from the list of master relationships (available with masterRelationships()), or from details relationships list, depending for which side of the relationship is this IndexSchem object assigned. Note: If rel was detached from masterRelationships() list, this object now has no parent, so you need to attach it to somewhere or destruct it. Definition at line 178 of file indexschema.cpp. |
|
Definition at line 84 of file indexschema.h. |
|
This flag is handled internally by TableSchema. It can be usable for GUI application if we do not want display implicity/auto generated indices on the indices list or we if want to show these indices to the user in a special way. Definition at line 95 of file indexschema.cpp. |
|
Definition at line 105 of file indexschema.cpp. |
|
Definition at line 117 of file indexschema.cpp. |
|
Definition at line 79 of file indexschema.h. |
|
Sets auto-generated flag. This method should be called only from TableSchema code
Definition at line 100 of file indexschema.cpp. |
|
If set is true, declares that the index defines a foreign key, created implicity for Relationship object. Setting this to true, implies clearing 'primary key', 'unique' and 'auto generated' flags. If this index contains just single field, it's 'foreign field' flag will be set to true as well. Definition at line 129 of file indexschema.cpp. |
|
Sets PRIMARY KEY flag.
Definition at line 110 of file indexschema.cpp. |
|
Sets UNIQUE flag.
Definition at line 122 of file indexschema.cpp. |
|
Definition at line 90 of file indexschema.cpp. |
Member Data Documentation
|
a list of relationships to table (of this index) Definition at line 184 of file indexschema.h. |
|
table on that index is built a list of master relationships for the table (of this index), this index is a master key for these relationships and therefore - owner of these Definition at line 178 of file indexschema.h. |
|
a list of master relationships that are not owned by this schema Definition at line 181 of file indexschema.h. |
The documentation for this class was generated from the following files: