public void MergeSchemaToKeyedTableWithDifferentKeyNameButSameTypeShouldKeepKeyButAddOtherColumns()
        {
            FeatureDataTable       table    = new FeatureDataTable(_factories.GeoFactory);
            FeatureProvider        provider = DataSourceHelper.CreateFeatureDatasource(_factories.GeoFactory);
            FeatureQueryExpression query    = FeatureQueryExpression.Intersects(provider.GetExtents());
            IFeatureDataReader     reader   = provider.ExecuteFeatureQuery(query);

            table.Load(reader, LoadOption.OverwriteChanges, null);

            FeatureDataTable <Guid> target = new FeatureDataTable <Guid>("GID", _factories.GeoFactory);

            table.MergeSchemaTo(target);

            DataTableHelper.AssertTableStructureIdentical(table, target);
        }
        public void MergeSchemaToSchemalessTargetShouldCreateIdenticalTable()
        {
            FeatureDataTable       table    = new FeatureDataTable(_factories.GeoFactory);
            FeatureProvider        provider = DataSourceHelper.CreateFeatureDatasource(_factories.GeoFactory);
            FeatureQueryExpression query    = FeatureQueryExpression.Intersects(provider.GetExtents());
            IFeatureDataReader     reader   = provider.ExecuteFeatureQuery(query);

            table.Load(reader, LoadOption.OverwriteChanges, null);

            FeatureDataTable target = new FeatureDataTable(_factories.GeoFactory);

            table.MergeSchemaTo(target);

            DataTableHelper.AssertTableStructureIdentical(table, target);
        }
示例#3
0
 internal void SetTableSchema(FeatureDataTable target, SchemaMergeAction mergeAction)
 {
     _baseTable.MergeSchemaTo(target, mergeAction);
 }
示例#4
0
 public void SetTableSchema(FeatureDataTable <Guid> table, SchemaMergeAction schemaMergeAction)
 {
     _features.MergeSchemaTo(table, schemaMergeAction);
 }