Useful ADO.NET DataTable processing routines It includes column rounding, column filling methods and some table manipulations routines. More...
Static Public Member Functions | |
| static DataTable | RoundColumn (DataTable source, int column, double precision) |
| Rounds the whole given column with specified precision. | |
| static DataTable | RoundColumn (DataTable source, string column, double precision) |
| Rounds the whole given column with specified precision. | |
| static DataTable | FillColumn (DataTable source, int column, object fillValue) |
| Fills the whole given column with a specified value. | |
| static DataTable | FillColumn (DataTable source, string column, object fillValue) |
| Fills the whole given column with a specified value. | |
| static DataTable | FillColumn (DataTable source, int column, FuncXY< DataTable, DataRowView, object > eval) |
| Fills the whole given column using function. | |
| static DataTable | FillColumn (DataTable source, string column, FuncXY< DataTable, DataRowView, object > eval) |
| Fills the whole given column using function. | |
| static DataTable | FillColumn (DataTable source, int column, string LispExpr) |
| Fills the whole given column using L# expression. | |
| static DataTable | FillColumn (DataTable source, string column, string LispExpr) |
| Fills the whole given column using L# expression. | |
| static DataTable | CreateTable (params Tuple2< string, Type >[] args) |
| Creates the table using column definitions. | |
| static DataTable | CreateTable (int rowCount, params Tuple2< string, Type >[] args) |
| Creates the table with rowCount new rows using column definitions. | |
| static DataTable | CreateTable (params DataRow[] rows) |
| Creates the table using a list of homogenic rows (all rows should belong to one table) Note: new table type is the same as the type of a teble-owner. | |
| static DataTable | CreateTable (IList< DataRow > rows) |
| Creates the table using a list of homogenic rows (all rows should belong to one table) Note: new table type is the same as the type of a teble-owner. | |
| static List< Tuple2< string, Type > > | GetStructure (DataTable source) |
| Gets the column structure of given table. | |
| static DataTable | AddToTable (DataTable dst, params object[] rowValues) |
| Adds to the given table the row. | |
| static DataTable | AddToTable (DataTable dst, params DataRow[] rows) |
| Adds to the given table a list of rows. | |
| static DataTable | AddToTable (DataTable dst, IEnumerable< DataRow > rows) |
| Adds to the given table a list of rows. | |
| static Tuple2< string, string >[] | GetMapping (DataTable src, DataTable dst, params string[] excludedColumns) |
| Creates a column mapping between source and target tables. | |
| static Tuple2< string, string >[] | GetMapping (params string[] args) |
| Creates a one-to-one column mapping. | |
| static DataTable | Copy (DataTable src, DataTable dst, string srcFilter, Tuple2< string, string >[] mapping) |
| Copies a rows from the source table into target table using row filter and column mapping. | |
| static DataTable | Copy (DataTable src, DataTable dst, Tuple2< string, string >[] mapping) |
| Copies a rows from the source table into target table using column mapping. | |
| static DataTable | Copy (DataTable src) |
| Copies a copy of table. | |
| static DataTable | Union (params DataTable[] tables) |
| Joins tbles with the same structure into new one. | |
Useful ADO.NET DataTable processing routines It includes column rounding, column filling methods and some table manipulations routines.
| static DataTable WX5.Data.AddToTable | ( | DataTable | dst, | |
| IEnumerable< DataRow > | rows | |||
| ) | [static] |
Adds to the given table a list of rows.
| dst | target table | |
| rows | list of rows |
| static DataTable WX5.Data.AddToTable | ( | DataTable | dst, | |
| params DataRow[] | rows | |||
| ) | [static] |
Adds to the given table a list of rows.
| dst | target table | |
| rows | list of rows |
| static DataTable WX5.Data.AddToTable | ( | DataTable | dst, | |
| params object[] | rowValues | |||
| ) | [static] |
Adds to the given table the row.
| dst | target table | |
| rowValues | row values |
| static DataTable WX5.Data.Copy | ( | DataTable | src | ) | [static] |
Copies a copy of table.
| src | source table |
| static DataTable WX5.Data.Copy | ( | DataTable | src, | |
| DataTable | dst, | |||
| Tuple2< string, string >[] | mapping | |||
| ) | [static] |
Copies a rows from the source table into target table using column mapping.
| src | source table | |
| dst | target table | |
| mapping |
| static DataTable WX5.Data.Copy | ( | DataTable | src, | |
| DataTable | dst, | |||
| string | srcFilter, | |||
| Tuple2< string, string >[] | mapping | |||
| ) | [static] |
Copies a rows from the source table into target table using row filter and column mapping.
| src | source table | |
| dst | target table | |
| srcFilter | row filter for source | |
| mapping | column mapping between source and target tables |
| static DataTable WX5.Data.CreateTable | ( | IList< DataRow > | rows | ) | [static] |
Creates the table using a list of homogenic rows (all rows should belong to one table) Note: new table type is the same as the type of a teble-owner.
| rows | source rows |
| static DataTable WX5.Data.CreateTable | ( | params DataRow[] | rows | ) | [static] |
Creates the table using a list of homogenic rows (all rows should belong to one table) Note: new table type is the same as the type of a teble-owner.
| rows | source rows |
| static DataTable WX5.Data.CreateTable | ( | int | rowCount, | |
| params Tuple2< string, Type >[] | args | |||
| ) | [static] |
Creates the table with rowCount new rows using column definitions.
| rowCount | a count of rows to be created | |
| args | column definitions |
| static DataTable WX5.Data.CreateTable | ( | params Tuple2< string, Type >[] | args | ) | [static] |
Creates the table using column definitions.
| args | column definitions |
| static DataTable WX5.Data.FillColumn | ( | DataTable | source, | |
| string | column, | |||
| string | LispExpr | |||
| ) | [static] |
Fills the whole given column using L# expression.
| source | target table | |
| column | column name | |
| LispExpr | expression to be evaluated |
| static DataTable WX5.Data.FillColumn | ( | DataTable | source, | |
| int | column, | |||
| string | LispExpr | |||
| ) | [static] |
Fills the whole given column using L# expression.
| source | target table | |
| column | column index | |
| LispExpr | expression to be evaluated |
| static DataTable WX5.Data.FillColumn | ( | DataTable | source, | |
| string | column, | |||
| FuncXY< DataTable, DataRowView, object > | eval | |||
| ) | [static] |
Fills the whole given column using function.
| source | target table | |
| column | column name | |
| eval | function to be evaluated |
| static DataTable WX5.Data.FillColumn | ( | DataTable | source, | |
| int | column, | |||
| FuncXY< DataTable, DataRowView, object > | eval | |||
| ) | [static] |
Fills the whole given column using function.
| source | target table | |
| column | column index | |
| eval | function to be evaluated |
| static DataTable WX5.Data.FillColumn | ( | DataTable | source, | |
| string | column, | |||
| object | fillValue | |||
| ) | [static] |
Fills the whole given column with a specified value.
| source | target table | |
| column | column name | |
| fillValue | value to fill |
| static DataTable WX5.Data.FillColumn | ( | DataTable | source, | |
| int | column, | |||
| object | fillValue | |||
| ) | [static] |
Fills the whole given column with a specified value.
| source | target table | |
| column | column index | |
| fillValue | value to fill |
| static Tuple2<string, string> [] WX5.Data.GetMapping | ( | params string[] | args | ) | [static] |
Creates a one-to-one column mapping.
| args | column names to be included into mapping |
| static Tuple2<string, string> [] WX5.Data.GetMapping | ( | DataTable | src, | |
| DataTable | dst, | |||
| params string[] | excludedColumns | |||
| ) | [static] |
Creates a column mapping between source and target tables.
| src | source table | |
| dst | target table | |
| excludedColumns | column names from the source or target which should not be included into mapping |
| static List<Tuple2<string, Type> > WX5.Data.GetStructure | ( | DataTable | source | ) | [static] |
Gets the column structure of given table.
| source | source table |
| static DataTable WX5.Data.RoundColumn | ( | DataTable | source, | |
| string | column, | |||
| double | precision | |||
| ) | [static] |
Rounds the whole given column with specified precision.
| source | target table | |
| column | column name | |
| precision | precision value |
| static DataTable WX5.Data.RoundColumn | ( | DataTable | source, | |
| int | column, | |||
| double | precision | |||
| ) | [static] |
Rounds the whole given column with specified precision.
| source | target table | |
| column | column index | |
| precision | precision value |
| static DataTable WX5.Data.Union | ( | params DataTable[] | tables | ) | [static] |
Joins tbles with the same structure into new one.
| tables | source tables |
1.6.3