Table of Contents

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

DataSchema

Methods

AddColumn(DataColumn)

Adds a column to the data block.

void AddColumn(DataColumn column)

Parameters

column DataColumn

The column to add.

AddRow(object[])

Adds a row to the data block.

void AddRow(object[] values)

Parameters

values object[]

The values to add as a new row.

Clone()

Creates a copy of the data block.

DataBlock Clone()

Returns

DataBlock

GetColumn(string)

Gets a column by name.

DataColumn GetColumn(string columnName)

Parameters

columnName string

The name of the column.

Returns

DataColumn

GetRowCursor(params string[])

Gets a row cursor for iterating over rows with specified columns.

IDataRowCursor GetRowCursor(params string[] columnNames)

Parameters

columnNames string[]

The columns to include, or null for all columns.

Returns

IDataRowCursor

HasColumn(string)

Determines if the data block contains a column.

bool HasColumn(string columnName)

Parameters

columnName string

The 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

index int

The index to insert the row at.

values object[]

The values for the row.

RemoveColumn(params string[])

Removes one or more columns by their names.

void RemoveColumn(params string[] columnNames)

Parameters

columnNames string[]

An array of column names to remove.

RemoveRow(int)

Removes a row by index.

void RemoveRow(int index)

Parameters

index int

The index of the row to remove.

UpdateRow(int, object[])

Updates a row at a specific index.

void UpdateRow(int index, object[] values)

Parameters

index int

The index of the row to update.

values object[]

The new values for the row.