private void InitializeThreaded(object state) { tables = schemaProvider.GetTables(); dataTypes = schemaProvider.GetDataTypes(); columns = originalTable.Columns; constraints = originalTable.Constraints; triggers = originalTable.Triggers; //TODO: indices indexes = new IndexSchemaCollection(); Runtime.LoggingService.Error("TABLE " + originalTable.Name); Runtime.LoggingService.Error(" columns = " + columns.Count); Runtime.LoggingService.Error(" constraints = " + constraints.Count); try { foreach (ColumnSchema col in columns) { int dummy = col.Constraints.Count; //get column constraints Runtime.LoggingService.Error("CONSTRAINTS " + col.Name + " " + dummy); } } catch (Exception ee) { Runtime.LoggingService.Error(ee); Runtime.LoggingService.Error(ee.StackTrace); } if (action == SchemaActions.Alter) //make a duplicate if we are going to alter the table { this.table = originalTable.Clone() as TableSchema; } DispatchService.GuiDispatch(delegate() { InitializeGui(); }); }
private void InitializeThreaded(object state) { tables = schemaProvider.GetTables(); dataTypes = schemaProvider.GetDataTypes(); columns = originalTable.Columns; constraints = originalTable.Constraints; triggers = originalTable.Triggers; //TODO: indices indexes = new IndexSchemaCollection(); System.Text.StringBuilder builder = new System.Text.StringBuilder(); builder.Append("Loading editor for TABLE "); builder.Append(originalTable.Name); builder.AppendLine(); builder.Append(" columns = "); builder.Append(columns.Count); builder.AppendLine(); builder.Append("constraints = "); builder.Append(constraints.Count); builder.AppendLine(); try { foreach (ColumnSchema col in columns) { int dummy = col.Constraints.Count; //get column constraints builder.Append("CONSTRAINTS "); builder.Append(col.Name); builder.Append(" "); builder.Append(dummy); builder.AppendLine(); } LoggingService.LogDebug(builder.ToString()); } catch (Exception ee) { LoggingService.LogDebug(builder.ToString()); LoggingService.LogError(ee.ToString()); } if (action == SchemaActions.Alter) //make a duplicate if we are going to alter the table { this.table = originalTable.Clone() as TableSchema; } DispatchService.GuiDispatch(delegate() { InitializeGui(); }); }