Kaydet (Commit) 0d6d62a5 authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

Implement column-type alteration. (firebird-sdbc)

Change-Id: Id192bd7d62d0ce9d5abc04390670cb277c6ec755
üst 3bd7d552
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "Table.hxx" #include "Table.hxx"
#include <comphelper/sequence.hxx> #include <comphelper/sequence.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/TIndexes.hxx> #include <connectivity/TIndexes.hxx>
#include <connectivity/TKeys.hxx> #include <connectivity/TKeys.hxx>
...@@ -115,7 +116,16 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, ...@@ -115,7 +116,16 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName,
getConnection()->createStatement()->execute(sSql); getConnection()->createStatement()->execute(sSql);
} }
if (bTypeChanged || bTypeNameChanged || bPrecisionChanged || bScaleChanged if (bTypeChanged || bTypeNameChanged)
{
OUString sSql(getAlterTableColumn(rColName) + "TYPE " +
::dbtools::createStandardTypePart(rDescriptor, getConnection()));
getConnection()->createStatement()->execute(sSql);
// TODO: could cause errors e.g. if incompatible types, deal with them here as appropriate.
// possibly we have to wrap things in Util::evaluateStatusVector.
}
if (bPrecisionChanged || bScaleChanged
|| bIsNullableChanged || bIsAutoIncrementChanged) || bIsNullableChanged || bIsAutoIncrementChanged)
{ {
// TODO: changeType // TODO: changeType
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment