Interface IDataBlock
- Namespace
- Datafication.Core.Data
- Assembly
- Datafication.Core.dll
Represents a data block with rows and columns.
public interface IDataBlock
Properties
RowCount
Gets the number of rows in the data block.
int RowCount { get; }
Property Value
- int
Schema
Gets the schema of the data block.
DataSchema Schema { get; }
Property Value
Methods
AddColumn(DataColumn)
Adds a column to the data block.
void AddColumn(DataColumn column)
Parameters
columnDataColumnThe column to add.
AddRow(object[])
Adds a row to the data block.
void AddRow(object[] values)
Parameters
valuesobject[]The values to add as a new row.
Clone()
Creates a copy of the data block.
DataBlock Clone()
Returns
GetColumn(string)
Gets a column by name.
DataColumn GetColumn(string columnName)
Parameters
columnNamestringThe name of the column.
Returns
GetRowCursor(params string[])
Gets a row cursor for iterating over rows with specified columns.
IDataRowCursor GetRowCursor(params string[] columnNames)
Parameters
columnNamesstring[]The columns to include, or null for all columns.
Returns
HasColumn(string)
Determines if the data block contains a column.
bool HasColumn(string columnName)
Parameters
columnNamestringThe name of the column to check.
Returns
- bool
InsertRow(int, object[])
Inserts a row at a specific index.
void InsertRow(int index, object[] values)
Parameters
indexintThe index to insert the row at.
valuesobject[]The values for the row.
RemoveColumn(params string[])
Removes one or more columns by their names.
void RemoveColumn(params string[] columnNames)
Parameters
columnNamesstring[]An array of column names to remove.
RemoveRow(int)
Removes a row by index.
void RemoveRow(int index)
Parameters
indexintThe index of the row to remove.
UpdateRow(int, object[])
Updates a row at a specific index.
void UpdateRow(int index, object[] values)
Parameters
indexintThe index of the row to update.
valuesobject[]The new values for the row.