summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mysql/YTables.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2010-06-10 10:33:55 +0200
committerNiklas Nebel <nn@openoffice.org>2010-06-10 10:33:55 +0200
commit88e530cb0c153655e43a5ee557421dc8dbdf2002 (patch)
tree79e1db44b816aa0c5c94de31410ecd64b0f4c686 /connectivity/source/drivers/mysql/YTables.cxx
parenta8edc64ce0b3e6238a704218b84247a5e63dedbb (diff)
parente03596eaf693b9809cffe86c21658a5ce381d6c3 (diff)
calc55: merge with DEV300_m81
Diffstat (limited to 'connectivity/source/drivers/mysql/YTables.cxx')
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index b337ddc92390..80bb2baf58c0 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -204,7 +204,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor )
{
const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
static const ::rtl::OUString s_sCreatePattern(RTL_CONSTASCII_USTRINGPARAM("(M,D)"));
- const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,s_sCreatePattern));
+ const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern));
Reference< XStatement > xStmt = xConnection->createStatement( );
if ( xStmt.is() )
{
@@ -230,4 +230,14 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable)
return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false );
}
// -----------------------------------------------------------------------------
-
+void OTables::addComment(const Reference< XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut)
+{
+ ::rtl::OUString sDesc;
+ descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sDesc;
+ if ( sDesc.getLength() )
+ {
+ _rOut.appendAscii(" COMMENT '");
+ _rOut.append(sDesc);
+ _rOut.appendAscii("'");
+ }
+}