diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-25 09:38:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-25 13:50:25 +0200 |
commit | bf7690bc1b444278bef1e355c7463d27381a8700 (patch) | |
tree | cb66315439e0fe3cf7c493b86a6fb290217b910b /connectivity | |
parent | 761e55d3683845606fcb94cfdf32450051b67a9d (diff) |
convert EComposeRule to scoped enum
Change-Id: I5a2e4f6f6f0f353c75dff85e865608b12c2104f9
Diffstat (limited to 'connectivity')
22 files changed, 63 insertions, 63 deletions
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 26ec91946edc..99392e9276ad 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -178,7 +178,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const OUString& _rForName, const Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); OUString aSql = "ALTER TABLE " + - ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ) + + ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::EComposeRule::InTableDefinitions, false, false, true ) + " ADD " + ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),nullptr,m_pTable->getTypeCreatePattern()); @@ -200,7 +200,7 @@ void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/, const OUString& _sElementNa Reference<XDatabaseMetaData> xMetaData = m_pTable->getConnection()->getMetaData(); OUString aQuote = xMetaData->getIdentifierQuoteString( ); OUString aSql = "ALTER TABLE " + - ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ) + + ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::EComposeRule::InTableDefinitions, false, false, true ) + " DROP " + ::dbtools::quoteName( aQuote,_sElementName); diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx index 6069bc227e65..f27bc9958f08 100644 --- a/connectivity/source/commontools/TIndexes.cxx +++ b/connectivity/source/commontools/TIndexes.cxx @@ -146,10 +146,10 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const OUString aCatalog,aSchema,aTable; - dbtools::qualifiedNameComponents(m_pTable->getMetaData(),m_pTable->getName(),aCatalog,aSchema,aTable,::dbtools::eInDataManipulation); + dbtools::qualifiedNameComponents(m_pTable->getMetaData(),m_pTable->getName(),aCatalog,aSchema,aTable,::dbtools::EComposeRule::InDataManipulation); OUString aComposedName; - aComposedName = dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable, true, ::dbtools::eInIndexDefinitions); + aComposedName = dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable, true, ::dbtools::EComposeRule::InIndexDefinitions); if (!_rForName.isEmpty() ) { aSql.append( ::dbtools::quoteName( aQuote, _rForName ) ); @@ -228,9 +228,9 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementNam OUString aSql( "DROP INDEX " ); - OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::eInIndexDefinitions, false, false, true ); + OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::EComposeRule::InIndexDefinitions, false, false, true ); OUString sIndexName,sTemp; - sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), sTemp, aSchema, aName, true, ::dbtools::eInIndexDefinitions ); + sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), sTemp, aSchema, aName, true, ::dbtools::EComposeRule::InIndexDefinitions ); aSql += sIndexName + " ON " + aComposedName; diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx index 3c2639583b0d..d06c91656495 100644 --- a/connectivity/source/commontools/TKeys.cxx +++ b/connectivity/source/commontools/TKeys.cxx @@ -159,7 +159,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re aSql.append("ALTER TABLE "); OUString aQuote = m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString( ); - aSql.append(composeTableName( m_pTable->getConnection()->getMetaData(), m_pTable, ::dbtools::eInTableDefinitions, false, false, true )); + aSql.append(composeTableName( m_pTable->getConnection()->getMetaData(), m_pTable, ::dbtools::EComposeRule::InTableDefinitions, false, false, true )); aSql.append(" ADD "); if ( nKeyType == KeyType::PRIMARY ) @@ -189,7 +189,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re if ( nKeyType == KeyType::FOREIGN ) { aSql.append(" REFERENCES "); - aSql.append(::dbtools::quoteTableName(m_pTable->getConnection()->getMetaData(),sReferencedName,::dbtools::eInTableDefinitions)); + aSql.append(::dbtools::quoteTableName(m_pTable->getConnection()->getMetaData(),sReferencedName,::dbtools::EComposeRule::InTableDefinitions)); aSql.append(" ("); for(sal_Int32 i=0;i<xColumns->getCount();++i) @@ -274,7 +274,7 @@ void OKeysHelper::dropObject(sal_Int32 _nPos, const OUString& _sElementName) OUStringBuffer aSql; aSql.append("ALTER TABLE "); - aSql.append( composeTableName( m_pTable->getConnection()->getMetaData(), m_pTable,::dbtools::eInTableDefinitions, false, false, true )); + aSql.append( composeTableName( m_pTable->getConnection()->getMetaData(), m_pTable,::dbtools::EComposeRule::InTableDefinitions, false, false, true )); sal_Int32 nKeyType = KeyType::PRIMARY; if ( xKey.is() ) diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index 95aede3a8005..930b2b0a4f05 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -393,7 +393,7 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames) if ( pKeyProps.get() ) m_pImpl->m_aKeys.insert(TKeyMap::value_type(sOldFKName,pKeyProps)); - const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,false,::dbtools::eInDataManipulation); + const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,false,::dbtools::EComposeRule::InDataManipulation); pKeyProps.reset(new sdbcx::KeyProperties(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule)); pKeyProps->m_aKeyColumnNames.push_back(sForeignKeyColumn); _rNames.push_back(sFkName); @@ -513,13 +513,13 @@ void SAL_CALL OTableHelper::rename( const OUString& newName ) throw(SQLException OUString sSql = getRenameStart(); OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUString sComposedName; - sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,true,::dbtools::eInDataManipulation); + sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,true,::dbtools::EComposeRule::InDataManipulation); sSql += sComposedName + " TO "; - sComposedName = ::dbtools::composeTableName(getMetaData(),sCatalog,sSchema,sTable,true,::dbtools::eInDataManipulation); + sComposedName = ::dbtools::composeTableName(getMetaData(),sCatalog,sSchema,sTable,true,::dbtools::EComposeRule::InDataManipulation); sSql += sComposedName; Reference< XStatement > xStmt = m_pImpl->m_xConnection->createStatement( ); @@ -533,7 +533,7 @@ void SAL_CALL OTableHelper::rename( const OUString& newName ) throw(SQLException OTable_TYPEDEF::rename(newName); } else - ::dbtools::qualifiedNameComponents(getMetaData(),newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInTableDefinitions); + ::dbtools::qualifiedNameComponents(getMetaData(),newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::EComposeRule::InTableDefinitions); } Reference< XDatabaseMetaData> OTableHelper::getMetaData() const @@ -562,7 +562,7 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference OUString SAL_CALL OTableHelper::getName() throw(RuntimeException, std::exception) { OUString sComposedName; - sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,false,::dbtools::eInDataManipulation); + sComposedName = ::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,false,::dbtools::EComposeRule::InDataManipulation); return sComposedName; } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 16e0b1250f30..e7b11fc3fafc 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -765,26 +765,26 @@ namespace switch ( _eComposeRule ) { - case eInTableDefinitions: + case EComposeRule::InTableDefinitions: pCatalogCall = &XDatabaseMetaData::supportsCatalogsInTableDefinitions; pSchemaCall = &XDatabaseMetaData::supportsSchemasInTableDefinitions; break; - case eInIndexDefinitions: + case EComposeRule::InIndexDefinitions: pCatalogCall = &XDatabaseMetaData::supportsCatalogsInIndexDefinitions; pSchemaCall = &XDatabaseMetaData::supportsSchemasInIndexDefinitions; break; - case eInProcedureCalls: + case EComposeRule::InProcedureCalls: pCatalogCall = &XDatabaseMetaData::supportsCatalogsInProcedureCalls; pSchemaCall = &XDatabaseMetaData::supportsSchemasInProcedureCalls; break; - case eInPrivilegeDefinitions: + case EComposeRule::InPrivilegeDefinitions: pCatalogCall = &XDatabaseMetaData::supportsCatalogsInPrivilegeDefinitions; pSchemaCall = &XDatabaseMetaData::supportsSchemasInPrivilegeDefinitions; break; - case eComplete: + case EComposeRule::Complete: bIgnoreMetaData = true; break; - case eInDataManipulation: + case EComposeRule::InDataManipulation: // already properly set above break; } @@ -1303,7 +1303,7 @@ OUString composeTableNameForSelect( const Reference< XConnection >& _rxConnectio bUseSchemaInSelect ? _rSchema : OUString(), _rName, true, - eInDataManipulation + EComposeRule::InDataManipulation ); } diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 1894f531c458..b8a97e78fe13 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -215,7 +215,7 @@ OUString createStandardCreateStatement(const Reference< XPropertySet >& descript descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= sSchema; descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= sTable; - sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); + sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InTableDefinitions ); if ( sComposedName.isEmpty() ) ::dbtools::throwFunctionSequenceException(_xConnection); @@ -329,8 +329,8 @@ OUString createStandardKeyStatement(const Reference< XPropertySet >& descriptor, sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); - sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); + ::dbtools::EComposeRule::InDataManipulation); + sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InTableDefinitions ); if ( sComposedName.isEmpty() ) diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index d3e318c9ac15..1f43707fb17b 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -219,7 +219,7 @@ namespace dbtools OUString tblName; xDetailField->getPropertyValue("TableName") >>= tblName; if (!tblName.isEmpty()) - sFilter = ::dbtools::quoteTableName( m_xConnectionMetadata, tblName, ::dbtools::eInDataManipulation ) + "."; + sFilter = ::dbtools::quoteTableName( m_xConnectionMetadata, tblName, ::dbtools::EComposeRule::InDataManipulation ) + "."; } { OUString colName; diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index 376811c5833a..8c67142f721e 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -126,7 +126,7 @@ namespace dbtools sStatement = "SELECT * FROM "; OUString sCatalog, sSchema, sTable; - qualifiedNameComponents( _rData.xConnection->getMetaData(), _rData.sCommand, sCatalog, sSchema, sTable, eInDataManipulation ); + qualifiedNameComponents( _rData.xConnection->getMetaData(), _rData.sCommand, sCatalog, sSchema, sTable, EComposeRule::InDataManipulation ); sStatement += composeTableNameForSelect( _rData.xConnection, sCatalog, sSchema, sTable ); } diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index 1b4ff1d35f9a..22debf341b1e 100644 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx @@ -289,7 +289,7 @@ namespace connectivity { namespace hsqldb // split the fully qualified name Reference< XDatabaseMetaData > xMetaData( xMe->getMetaData(), UNO_QUERY_THROW ); OUString sCatalog, sSchema, sName; - ::dbtools::qualifiedNameComponents( xMetaData, _rTableName, sCatalog, sSchema, sName, ::dbtools::eComplete ); + ::dbtools::qualifiedNameComponents( xMetaData, _rTableName, sCatalog, sSchema, sName, ::dbtools::EComposeRule::Complete ); // get the table information OUStringBuffer sSQL; diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index dd63b91725fb..8727c155e323 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -315,7 +315,7 @@ OUString OHSQLTable::getAlterTableColumnPart() { OUString sSql( "ALTER TABLE " ); - OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::eInTableDefinitions ) ); + OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::EComposeRule::InTableDefinitions ) ); sSql += sComposedName; return sSql; @@ -382,19 +382,19 @@ void SAL_CALL OHSQLTable::rename( const OUString& newName ) throw(SQLException, sSql += " TABLE "; OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); sSql += - ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::eInDataManipulation ) + ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::EComposeRule::InDataManipulation ) + " RENAME TO " - + ::dbtools::composeTableName( getMetaData(), sCatalog, sSchema, sTable, true, ::dbtools::eInDataManipulation ); + + ::dbtools::composeTableName( getMetaData(), sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InDataManipulation ); executeStatement(sSql); ::connectivity::OTable_TYPEDEF::rename(newName); } else - ::dbtools::qualifiedNameComponents(getMetaData(),newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInTableDefinitions); + ::dbtools::qualifiedNameComponents(getMetaData(),newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::EComposeRule::InTableDefinitions); } diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index a519e926315f..0175f6745387 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -49,7 +49,7 @@ using namespace dbtools; sdbcx::ObjectType OTables::createObject(const OUString& _rName) { OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); static const char s_sTableTypeView[] = "VIEW"; static const char s_sTableTypeTable[] = "TABLE"; @@ -126,7 +126,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUString aSql( "DROP " ); @@ -138,7 +138,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) aSql += "TABLE "; OUString sComposedName( - ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInDataManipulation ) ); + ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InDataManipulation ) ); aSql += sComposedName; Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) @@ -183,7 +183,7 @@ void OTables::appendNew(const OUString& _rsNewTable) OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) { OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!"); - return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); + return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); } diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index 7a45a51892fa..fdf5f236174b 100644 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx @@ -93,7 +93,7 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In // first we need to create the sql stmt to select the privs Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(xMeta,objName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(xMeta,objName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); Reference<XResultSet> xRes; switch(objType) { @@ -228,7 +228,7 @@ void SAL_CALL OHSQLUser::grantPrivileges( const OUString& objName, sal_Int32 obj { Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); OUString sGrant = "GRANT " + sPrivs + - " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation) + + " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::EComposeRule::InDataManipulation) + " TO " + ::dbtools::quoteName(xMeta->getIdentifierQuoteString(), m_Name); Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -254,7 +254,7 @@ void SAL_CALL OHSQLUser::revokePrivileges( const OUString& objName, sal_Int32 ob { Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); OUString sGrant = "REVOKE " + sPrivs + - " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation) + + " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::EComposeRule::InDataManipulation) + " FROM " + ::dbtools::quoteName(xMeta->getIdentifierQuoteString(), m_Name); Reference<XStatement> xStmt = m_xConnection->createStatement(); diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx index f4f6442d9a1d..ff62ebf24d34 100644 --- a/connectivity/source/drivers/hsqldb/HView.cxx +++ b/connectivity/source/drivers/hsqldb/HView.cxx @@ -87,7 +87,7 @@ namespace connectivity { namespace hsqldb // backend support. OUString sQualifiedName( ::dbtools::composeTableName( - m_xMetaData, m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::eInDataManipulation ) ); + m_xMetaData, m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::EComposeRule::InDataManipulation ) ); ::utl::SharedUNOComponent< XStatement > xStatement; xStatement.set( m_xConnection->createStatement(), UNO_QUERY_THROW ); diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index 157cd8481e9d..53c7b20da23b 100644 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx @@ -68,7 +68,7 @@ sdbcx::ObjectType HViews::createObject(const OUString& _rName) sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); return new HView( m_xConnection, isCaseSensitive(), sSchema, sTable ); } @@ -111,7 +111,7 @@ void HViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/) OUString aSql( "DROP VIEW" ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); - aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); + aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::EComposeRule::InTableDefinitions, false, false, true ); Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); Reference< XStatement > xStmt = xConnection->createStatement( ); @@ -135,7 +135,7 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; OUString aSql = "CREATE VIEW " + - ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ) + + ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::EComposeRule::InTableDefinitions, false, false, true ) + " AS " + sCommand; Reference< XStatement > xStmt = xConnection->createStatement( ); @@ -149,7 +149,7 @@ void HViews::createView( const Reference< XPropertySet >& descriptor ) OTables* pTables = static_cast<OTables*>(static_cast<OHCatalog&>(m_rParent).getPrivateTables()); if ( pTables ) { - OUString sName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInDataManipulation, false, false, false ); + OUString sName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); pTables->appendNew(sName); } } diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index d9390c3a7dff..8e154d476889 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -336,7 +336,7 @@ OUString OMySQLTable::getAlterTableColumnPart() OUString sSql( "ALTER TABLE " ); OUString sComposedName( - ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::eInTableDefinitions ) ); + ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, true, ::dbtools::EComposeRule::InTableDefinitions ) ); sSql += sComposedName; return sSql; diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index 5c1e2da0e958..7d12bf82cf19 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -49,7 +49,7 @@ using namespace dbtools; sdbcx::ObjectType OTables::createObject(const OUString& _rName) { OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); static const char s_sTableTypeView[] = "VIEW"; static const char s_sTableTypeTable[] = "TABLE"; @@ -131,7 +131,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUString aSql( "DROP " ); @@ -143,7 +143,7 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName) aSql += "TABLE "; OUString sComposedName( - ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInDataManipulation ) ); + ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InDataManipulation ) ); aSql += sComposedName; Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) @@ -204,7 +204,7 @@ void OTables::appendNew(const OUString& _rsNewTable) OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) { OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!"); - return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); + return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); } void OTables::addComment(const Reference< XPropertySet >& descriptor,OUStringBuffer& _rOut) diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 2e57ff22ec0e..1a0960b71b82 100644 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx @@ -93,7 +93,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I // first we need to create the sql stmt to select the privs Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(xMeta,objName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(xMeta,objName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); Reference<XResultSet> xRes; switch(objType) { @@ -227,7 +227,7 @@ void SAL_CALL OMySQLUser::grantPrivileges( const OUString& objName, sal_Int32 ob { Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); OUString sGrant = "GRANT " + sPrivs + - " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation) + + " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::EComposeRule::InDataManipulation) + " TO " + m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); @@ -253,7 +253,7 @@ void SAL_CALL OMySQLUser::revokePrivileges( const OUString& objName, sal_Int32 o { Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); OUString sGrant = "REVOKE " + sPrivs + - " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::eInDataManipulation) + + " ON " + ::dbtools::quoteTableName(xMeta,objName,::dbtools::EComposeRule::InDataManipulation) + " FROM " + m_Name; Reference<XStatement> xStmt = m_xConnection->createStatement(); diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index cfe2998bf25d..1519ea4adca5 100644 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx @@ -56,7 +56,7 @@ sdbcx::ObjectType OViews::createObject(const OUString& _rName) sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); return new ::connectivity::sdbcx::OView(isCaseSensitive(), sTable, m_xMetaData, @@ -105,7 +105,7 @@ void OViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/) OUString aSql( "DROP VIEW" ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); - aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); + aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::EComposeRule::InTableDefinitions, false, false, true ); Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); Reference< XStatement > xStmt = xConnection->createStatement( ); @@ -128,7 +128,7 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) OUString aSql( "CREATE VIEW " ); OUString sCommand; - aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); + aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::EComposeRule::InTableDefinitions, false, false, true ); aSql += " AS "; descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; @@ -145,7 +145,7 @@ void OViews::createView( const Reference< XPropertySet >& descriptor ) OTables* pTables = static_cast<OTables*>(static_cast<OMySQLCatalog&>(m_rParent).getPrivateTables()); if ( pTables ) { - OUString sName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInDataManipulation, false, false, false ); + OUString sName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); pTables->appendNew(sName); } } diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 309674ef271d..60203c21f738 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -293,7 +293,7 @@ namespace sSchema, sName, false, - ::dbtools::eInDataManipulation + ::dbtools::EComposeRule::InDataManipulation ); } } @@ -364,7 +364,7 @@ OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const OUString& _rComp try { OUString sCatalog, sSchema, sName; - qualifiedNameComponents( m_pImpl->m_xDatabaseMetaData, sComposedName, sCatalog, sSchema, sName, ::dbtools::eInDataManipulation ); + qualifiedNameComponents( m_pImpl->m_xDatabaseMetaData, sComposedName, sCatalog, sSchema, sName, ::dbtools::EComposeRule::InDataManipulation ); // check whether there is a query with the given name bool bQueryDoesExist = m_pImpl->m_xQueryContainer.is() && m_pImpl->m_xQueryContainer->hasByName( sComposedName ); @@ -448,7 +448,7 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQ aSchema, aTableName, false, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); // if there is no alias for the table name assign the orignal name to it if ( aTableRange.isEmpty() ) diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx index 6c4924062a50..4069b3352b68 100644 --- a/connectivity/source/sdbcx/VCatalog.cxx +++ b/connectivity/source/sdbcx/VCatalog.cxx @@ -198,7 +198,7 @@ OUString OCatalog::buildName(const Reference< XRow >& _xRow) sTable.clear(); OUString sComposedName( - ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, false, ::dbtools::eInDataManipulation ) ); + ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, false, ::dbtools::EComposeRule::InDataManipulation ) ); return sComposedName; } diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index 012cd109b5cd..f15de0dff965 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -266,7 +266,7 @@ void SAL_CALL OTable::rename( const OUString& newName ) throw(SQLException, Elem const OUString sOldComposedName = getName(); const Reference< XDatabaseMetaData> xMetaData = getMetaData(); if ( xMetaData.is() ) - ::dbtools::qualifiedNameComponents(xMetaData,newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(xMetaData,newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::EComposeRule::InDataManipulation); else m_Name = newName; diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index fe3b0ff1ebdc..5a42836f6cc7 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -100,7 +100,7 @@ OUString SAL_CALL OView::getName() throw(::com::sun::star::uno::RuntimeException { OUString sComposedName; if(m_xMetaData.is()) - sComposedName = ::dbtools::composeTableName( m_xMetaData, m_CatalogName, m_SchemaName, m_Name, false, ::dbtools::eInDataManipulation ); + sComposedName = ::dbtools::composeTableName( m_xMetaData, m_CatalogName, m_SchemaName, m_Name, false, ::dbtools::EComposeRule::InDataManipulation ); else { Any aValue; |