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/source/drivers/hsqldb | |
parent | 761e55d3683845606fcb94cfdf32450051b67a9d (diff) |
convert EComposeRule to scoped enum
Change-Id: I5a2e4f6f6f0f353c75dff85e865608b12c2104f9
Diffstat (limited to 'connectivity/source/drivers/hsqldb')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HConnection.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTable.cxx | 10 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTables.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HUser.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HView.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HViews.cxx | 8 |
6 files changed, 18 insertions, 18 deletions
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); } } |