[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi/plugins/queries
From: Lucijan Busch <lucijan () kde ! org>
Date: 2004-01-05 22:33:09
Message-ID: 20040105223309.8749493EA () office ! kde ! org
[Download RAW message or body]
CVS commit by lucijan:
read/write queries are now supported
M +18 -2 kexiquerydesignerguieditor.cpp 1.44
--- koffice/kexi/plugins/queries/kexiquerydesignerguieditor.cpp #1.43:1.44
@@ -114,16 +114,32 @@ KexiQueryDesignerGuiEditor::schema()
{
KexiDB::QuerySchema *s = new KexiDB::QuerySchema();
+ QDict<KexiDB::TableSchema> tables;
for(KexiTableItem *it = m_data->first(); it; it = m_data->next())
{
- if(it->at(0).toString().isEmpty() || it->at(1).toString().isEmpty())
+ QString tableName = it->at(0).toString();
+
+ if(tableName.isEmpty() || it->at(1).toString().isEmpty())
continue;
+ KexiDB::TableSchema *t = tables[it->at(0).toString()];
+ if(!t)
+ {
+ t = m_conn->tableSchema(tableName);
+ tables.insert(tableName, t);
+ s->addTable(t);
+ }
+
KexiDB::Field *f = new KexiDB::Field();
f->setName(it->at(1).toString());
- f->setTable(m_conn->tableSchema(it->at(0).toString()));
+ f->setTable(t);
s->addField(f);
}
+// containsRef
+
+ //this is temporary and will later be replaced by a intelligent master-table-finder in
+ //KexiDB::Connection::selectStatement()
+ s->setParentTable(s->tables()->first());
return s;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic