summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/evoab2/NColumns.cxx
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-11-01 14:19:14 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2012-11-02 10:54:12 +0100
commit10359585eb1fa338b686c288c1d3b3e0fe9fca66 (patch)
tree2ef2c81441026c718c258d19451f1d453e00eab3 /connectivity/source/drivers/evoab2/NColumns.cxx
parent20380f26b47faffe0cf541f46b8706439a5d4219 (diff)
Columns should know their table
For example dbaccess::OSingleSelectQueryComposer::appendOrderByColumn expects it (via impl_getColumnName_throw via getTableAlias) There is some vagueness: Should the TableName property contain just the table name, or the *composed* table name (that is with catalog and/or schema if used by this DB)? In the case of a query, should it contain the table name (alias) *in* *the* *query* or of the original table? In the former case, what meaning do SchemaName and CatalogName have? They should be empty? For now, commit as such and deal with the fallout, if any, when it hits the fan. If we really need to store these *different* values, (that is, some code validly needs them) it would be easier / cleaner / ... to define *different* properties for these *different* notions. Change-Id: I032e619a60e7563cd51478db16cb5e0e5452bfde
Diffstat (limited to 'connectivity/source/drivers/evoab2/NColumns.cxx')
-rw-r--r--connectivity/source/drivers/evoab2/NColumns.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx
index c4cae93cfcfe..b131bc36bb95 100644
--- a/connectivity/source/drivers/evoab2/NColumns.cxx
+++ b/connectivity/source/drivers/evoab2/NColumns.cxx
@@ -37,10 +37,14 @@ using namespace connectivity::evoab;
// -------------------------------------------------------------------------
sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName)
{
+ const Any aCatalog;
+ const ::rtl::OUString sCatalogName;
+ const ::rtl::OUString sSchemaName(m_pTable->getSchema());
+ const ::rtl::OUString sTableName(m_pTable->getTableName());
Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getColumns(
- Any(),
- m_pTable->getSchema(),
- m_pTable->getTableName(),
+ aCatalog,
+ sSchemaName,
+ sTableName,
_rName);
sdbcx::ObjectType xRet = NULL;
@@ -64,7 +68,10 @@ sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName)
sal_False,
sal_False,
sal_False,
- sal_True);
+ sal_True,
+ sCatalogName,
+ sSchemaName,
+ sTableName);
xRet = pRet;
break;
}