[fdo-commits] r639 - branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Fri Jan 19 13:55:21 EST 2007
Author: brentrobinson
Date: 2007-01-19 13:55:21 -0500 (Fri, 19 Jan 2007)
New Revision: 639
Modified:
branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Table.cpp
Log:
Filter out check constraints on multiple columns (not supported by FDO)
Modified: branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Table.cpp
===================================================================
--- branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Table.cpp 2007-01-19 18:51:20 UTC (rev 638)
+++ branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Table.cpp 2007-01-19 18:55:21 UTC (rev 639)
@@ -1029,6 +1029,9 @@
void FdoSmPhTable::LoadCkeys( FdoSmPhReaderP ckeyRdr, bool isSkipAdd )
{
+ FdoStringP ckeyNameCurr;
+ FdoSmPhCheckConstraintP ckeyCurr;
+
// read each check constraint column.
while (ckeyRdr && ckeyRdr->ReadNext() ) {
@@ -1047,11 +1050,27 @@
if ( GetElementState() != FdoSchemaElementState_Deleted )
AddCkeyColumnError( columnName );
}
- if( ! isSkipAdd ) {
- FdoSmPhCheckConstraintP pConstr = new FdoSmPhCheckConstraint( ckeyName, columnName, clause );
- mCkeysCollection->Add( pConstr );
+
+ if( ! isSkipAdd ) {
+ if ( ckeyName != ckeyNameCurr ) {
+ if ( ckeyCurr )
+ mCkeysCollection->Add( ckeyCurr );
+
+ ckeyCurr = new FdoSmPhCheckConstraint( ckeyName, columnName, clause );
+ }
+ else {
+ // FDO does not support multi-column value constraints.
+ // Also, Schema Manager is not yet set up to handle them so skip them.
+ ckeyCurr = NULL;
+ }
}
+
+ ckeyNameCurr = ckeyName;
}
+
+ // Add the last constraint
+ if ( ckeyCurr && ! isSkipAdd )
+ mCkeysCollection->Add( ckeyCurr );
}
More information about the fdo-commits
mailing list