diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-09-11 10:55:22 +0100 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-09-11 18:40:44 +0100 |
commit | bc09772b407b29cbc66c76f35f74a5548acc0e91 (patch) | |
tree | f6808d1394233b733f184c0d177785f0daa5f7d6 /connectivity | |
parent | c461cc8473e17f239aa1a7acacb850d3e5ed571f (diff) |
Change of precision is equivalent to type change. (firebird-sdbc)
Change-Id: I5f8c80b01917028fe80d468f5e96de56b917bd7e
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/firebird/Table.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/connectivity/source/drivers/firebird/Table.cxx b/connectivity/source/drivers/firebird/Table.cxx index 2b9d5787f0b9..85ff0685c8ad 100644 --- a/connectivity/source/drivers/firebird/Table.cxx +++ b/connectivity/source/drivers/firebird/Table.cxx @@ -145,8 +145,11 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, getConnection()->createStatement()->execute(sSql); } - if (bTypeChanged || bTypeNameChanged) + if (bTypeChanged || bTypeNameChanged || bPrecisionChanged || bScaleChanged) { + // If bPrecisionChanged this will only succeed if we have increased the + // precision, otherwise an exception is thrown -- however the base + // gui then offers to delete and recreate the column. OUString sSql(getAlterTableColumn(rColName) + "TYPE " + ::dbtools::createStandardTypePart(rDescriptor, getConnection())); getConnection()->createStatement()->execute(sSql); @@ -192,7 +195,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, } } - if (bPrecisionChanged || bScaleChanged || bIsAutoIncrementChanged) + if (bIsAutoIncrementChanged) { // TODO: changeType } @@ -213,7 +216,6 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, } m_pColumns->refresh(); - // TODO: implement me } // ----- XRename -------------------------------------------------------------- |