summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mysql
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-25 09:38:09 +0200
committerNoel Grandin <noel@peralex.com>2016-02-25 13:50:25 +0200
commitbf7690bc1b444278bef1e355c7463d27381a8700 (patch)
treecb66315439e0fe3cf7c493b86a6fb290217b910b /connectivity/source/drivers/mysql
parent761e55d3683845606fcb94cfdf32450051b67a9d (diff)
convert EComposeRule to scoped enum
Change-Id: I5a2e4f6f6f0f353c75dff85e865608b12c2104f9
Diffstat (limited to 'connectivity/source/drivers/mysql')
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx8
-rw-r--r--connectivity/source/drivers/mysql/YUser.cxx6
-rw-r--r--connectivity/source/drivers/mysql/YViews.cxx8
4 files changed, 12 insertions, 12 deletions
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);
}
}