List <BD2.Conv.Frontend.Table.Row> readRowsData(SqlConnection connection, SqlCommand command, SqlDataReader reader, Table table) { Console.WriteLine("readRowsData()"); List <BD2.Conv.Frontend.Table.Row> rows = new List <BD2.Conv.Frontend.Table.Row> (); object[] values; //SortedDictionary<string, Column> table = tableColumns [context.Table.SqlTableID]; string[] rowTFQNs = new string[reader.FieldCount]; BD2.Conv.Frontend.Table.Column[] cols = new BD2.Conv.Frontend.Table.Column[reader.FieldCount]; for (int n = 0; n != reader.FieldCount; n++) { cols [n] = psc.GetColumnByName(table, reader.GetName(n)); rowTFQNs [n] = cols [n].TFQN; } int rc = 0; ColumnSet columnSet = new ColumnSet(cols); while (reader.Read()) { rc++; values = new object[reader.FieldCount]; reader.GetValues(values); BD2.Conv.Frontend.Table.Row r = new BD2.Conv.Frontend.Table.Row(columnSet, values); rows.Add(r); } reader.Close(); connection.Close(); return(rows); }
public GetColumnsResponseMessage(Guid requestID, Column[] columns, Exception exception) { if (columns == null) throw new ArgumentNullException ("columns"); this.requestID = requestID; this.columns = columns; this.exception = exception; }
public void AddColumn(Table table, Column column) { perTableColumnsByID [table].Add (column.ID, column); perTableColumnsByName [table].Add (column.Name, column); }
List<BD2.Conv.Frontend.Table.Row> readRowsData(SqlConnection connection, SqlCommand command, SqlDataReader reader, Table table) { Console.WriteLine ("readRowsData()"); List<BD2.Conv.Frontend.Table.Row> rows = new List<BD2.Conv.Frontend.Table.Row> (); object[] values; //SortedDictionary<string, Column> table = tableColumns [context.Table.SqlTableID]; string[] rowTFQNs = new string[reader.FieldCount]; BD2.Conv.Frontend.Table.Column[] cols = new BD2.Conv.Frontend.Table.Column[reader.FieldCount]; for (int n = 0; n != reader.FieldCount; n++) { cols [n] = psc.GetColumnByName (table, reader.GetName (n)); rowTFQNs [n] = cols [n].TFQN; } int rc = 0; ColumnSet columnSet = new ColumnSet (cols); while (reader.Read ()) { rc++; values = new object[reader.FieldCount]; reader.GetValues (values); BD2.Conv.Frontend.Table.Row r = new BD2.Conv.Frontend.Table.Row (columnSet, values); rows.Add (r); } reader.Close (); connection.Close (); return rows; }
public ColumnSet(Column[] columns) { this.columns = columns; }