20#ifndef KEXIDB_RELATIONSHIP_H
21#define KEXIDB_RELATIONSHIP_H
23#include <kexidb/field.h>
77class KEXI_DB_EXPORT Relationship
80 typedef TQPtrList<Relationship> List;
81 typedef TQPtrListIterator<Relationship> ListIterator;
91 Relationship(IndexSchema* masterIndex, IndexSchema* detailsIndex);
93 virtual ~Relationship();
97 IndexSchema* masterIndex() const { return m_masterIndex; }
101 IndexSchema* detailsIndex() const { return m_detailsIndex; }
106 Field::PairList* fieldPairs() { return &m_pairs; }
108 bool isEmpty() const { return m_pairs.isEmpty(); }
112 TableSchema* masterTable() const;
116 TableSchema* detailsTable() const;
129 void setIndices(IndexSchema* masterIndex, IndexSchema* detailsIndex);
132 Relationship( QuerySchema *query, Field *field1, Field *field2 );
134 void createIndices( QuerySchema *query, Field *field1, Field *field2 );
138 void setIndices(IndexSchema* masterIndex, IndexSchema* detailsIndex, bool ownedByMaster);
140 IndexSchema *m_masterIndex;
141 IndexSchema *m_detailsIndex;
143 Field::PairList m_pairs;
145 bool m_masterIndexOwned : 1;
146 bool m_detailsIndexOwned : 1;
148 friend class Connection;
149 friend class TableSchema;
150 friend class QuerySchema;
151 friend class IndexSchema;
Provides information about database index that can be created for a database table.
KexiDB::QuerySchema provides information about database query.
High-level database connectivity library with database backend drivers.
|