public void Initialize(DataTable schemaTable, TableInitializationOptions options) { if ((options & TableInitializationOptions.Drop) != 0) { Drop(); } LoadColumnsFromSchemaTable(schemaTable); if ((options & TableInitializationOptions.Append) != 0) { if (!VerifyColumns(true)) { throw new SchemaException("Table is to be appended but schemas do not match."); // *** TODO } } else if ((options & TableInitializationOptions.Create) != 0) { Create(); } else { // *** TODO: implement other options throw new NotImplementedException(); } if ((options & TableInitializationOptions.Clear) != 0) { Truncate(); } }
private void CopyMembers(DestinationTable old) { this.dataset = old.dataset; this.databaseName = old.databaseName; this.schemaName = old.schemaName; this.tableName = old.tableName; this.options = old.options; }
private void InitializeMembers() { this.dataset = null; this.databaseName = null; this.schemaName = null; this.tableName = null; this.options = TableInitializationOptions.Create; }
public DestinationTable(SqlServerDataset dataset, string databaseName, string schemaName, string tableName, TableInitializationOptions options) { InitializeMembers(); this.dataset = dataset; this.databaseName = databaseName; this.schemaName = schemaName; this.tableName = tableName; this.options = options; }