18 using System.Collections.Generic;
23 namespace Deveel.Data.Sql.Tables {
41 private bool IsMutable {
53 public override int RowCount {
57 protected override int ColumnCount {
65 protected override IEnumerable<int>
ResolveRows(
int column, IEnumerable<int> rowSet,
ITable ancestor) {
68 throw new Exception(
"Method routed to incorrect table ancestor.");
84 public override void Lock() {
86 MutableTable.AddLock();
91 MutableTable.RemoveLock();
95 get {
return MutableTable.EventRegistry; }
99 MutableTable.AddLock();
103 MutableTable.RemoveLock();
109 var newRowId = MutableTable.AddRow(row);
118 throw new ArgumentNullException(
"row");
120 var rowId = row.
RowId;
122 throw new ArgumentException(
"Cannot update a row with NULL ROWID");
126 MutableTable.UpdateRow(row);
133 var result = MutableTable.RemoveRow(rowId);
141 MutableTable.FlushIndexes();
145 MutableTable.AssertConstraints();
148 protected override void Dispose(
bool disposing) {
abstract DataObject GetValue(long rowNumber, int columnOffset)
Gets a single cell within the table that is located at the given column offset and row...
int IQueryTable. ColumnCount
Defines the contract to access the data contained into a table of a database.
A wrapper around a table that fires triggers on table events.
void UpdateRow(Row row)
Updates the values of a row into the table.
TriggerEventType
The different types of high layer trigger events.
override ColumnIndex GetColumnIndex(int columnOffset)
override void SetupIndexes(Type indexType)
override DataObject GetValue(long rowNumber, int columnOffset)
Gets a single cell within the table that is located at the given column offset and row...
override IEnumerable< int > ResolveRows(int column, IEnumerable< int > rowSet, ITable ancestor)
abstract IEnumerator< Row > GetEnumerator()
RowId AddRow(Row row)
Persists a new row to the table.
A single row in a table of a database.
override void Dispose(bool disposing)
override bool Equals(object obj)
void OnTableEvent(TriggerEventType eventType, RowId rowId, Row row)
ObjectName TableName
Gets the fully qualified name of the table that is ensured to be unique within the system...
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
static readonly RowId Null
Gets a NULL instance of RowId.
TableInfo TableInfo
Gets the metadata information of the table, used to resolve the column sources.
Exposes the context of an event fired on a table.
Defines the value of a ROWID object, that is a unique reference within a database system to a single ...
override IEnumerator< Row > GetEnumerator()
TableEventRegistry EventRegistry
bool RemoveRow(RowId rowId)
Deletes row identified by the given coordinates from the table.
void AssertConstraints()
Performs all constraint integrity checks and actions to any modifications based on any changes that h...
Defines the metadata properties of a table existing within a database.
ColumnIndex IQueryTable. GetIndex(int column, int originalColumn, ITable table)
UserContextTable(IQuery context, ITable table)
void FlushIndexes()
Flushes all changes made on this table to the backing index scheme.
An interface that defines contracts to alter the contents of a table.
abstract TableInfo TableInfo
RowId RowId
Gets the row unique identifier within the database.