Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetSortedSchemaRows()

static DbSchemaRow[] System.Data.Common.DbSchemaRow.GetSortedSchemaRows ( DataTable dataTable,
bool returnProviderSpecificTypes )
inlinestaticpackage

Definition at line 283 of file DbSchemaRow.cs.

284 {
285 DataColumn dataColumn = dataTable.Columns["SchemaMapping Unsorted Index"];
286 if (dataColumn == null)
287 {
288 dataColumn = new DataColumn("SchemaMapping Unsorted Index", typeof(int));
289 dataTable.Columns.Add(dataColumn);
290 }
291 int count = dataTable.Rows.Count;
292 for (int i = 0; i < count; i++)
293 {
294 dataTable.Rows[i][dataColumn] = i;
295 }
296 DbSchemaTable schemaTable = new DbSchemaTable(dataTable, returnProviderSpecificTypes);
297 DataRow[] array = SelectRows(dataTable, returnProviderSpecificTypes);
298 DbSchemaRow[] array2 = new DbSchemaRow[array.Length];
299 for (int j = 0; j < array.Length; j++)
300 {
301 array2[j] = new DbSchemaRow(schemaTable, array[j]);
302 }
303 return array2;
304 }
DbSchemaRow(DbSchemaTable schemaTable, DataRow dataRow)
static DataRow[] SelectRows(DataTable dataTable, bool returnProviderSpecificTypes)

References System.Data.Common.DbSchemaRow.DbSchemaRow(), System.Data.DataColumnCollection.Add(), System.array, System.Data.DataTable.Columns, System.Data.DataRowCollection.Count, System.count, System.Data.DataTable.Rows, and System.Data.Common.DbSchemaRow.SelectRows().

Referenced by System.Data.Common.DbCommandBuilder.BuildInformation(), and System.Data.ProviderBase.SchemaMapping.SetupSchemaWithKeyInfo().