DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | List of all members
Deveel.Data.Sql.Tables.IMutableTable Interface Reference

An interface that defines contracts to alter the contents of a table. More...

Inheritance diagram for Deveel.Data.Sql.Tables.IMutableTable:
Deveel.Data.Sql.Tables.ITable Deveel.Data.Sql.IDbObject Deveel.Data.Sql.Tables.UserContextTable Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew Deveel.Data.Transactions.TransactionTable

Public Member Functions

void AddLock ()
 
void RemoveLock ()
 
RowId AddRow (Row row)
 Persists a new row to the table. More...
 
void UpdateRow (Row row)
 Updates the values of a row into the table. More...
 
bool RemoveRow (RowId rowId)
 Deletes row identified by the given coordinates from the table. More...
 
void FlushIndexes ()
 Flushes all changes made on this table to the backing index scheme. More...
 
void AssertConstraints ()
 Performs all constraint integrity checks and actions to any modifications based on any changes that happened to the table since that last call to this method. More...
 
- Public Member Functions inherited from Deveel.Data.Sql.Tables.ITable
DataObject GetValue (long rowNumber, int columnOffset)
 Gets a single cell within the table that is located at the given column offset and row. More...
 
ColumnIndex GetIndex (int columnOffset)
 Gets an index for given column that can be used to select values from this table. More...
 

Properties

TableEventRegistry EventRegistry [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.ITable
IContext Context [get]
 
TableInfo TableInfo [get]
 Gets the metadata information of the table, used to resolve the column sources. More...
 
int RowCount [get]
 Gets the total number of rows in the table. More...
 
- Properties inherited from Deveel.Data.Sql.IDbObject
ObjectName FullName [get]
 Gets the fully qualified name of the object used to resolve it uniquely within the database. More...
 
DbObjectType ObjectType [get]
 Gets the type of database object that the implementation is for More...
 

Detailed Description

An interface that defines contracts to alter the contents of a table.

Definition at line 26 of file IMutableTable.cs.

Member Function Documentation

void Deveel.Data.Sql.Tables.IMutableTable.AddLock ( )
RowId Deveel.Data.Sql.Tables.IMutableTable.AddRow ( Row  row)

Persists a new row to the table.

The row to be added must belong to the table context, otherwise an exception will be thrown.

Parameters
rowThe row to be persisted.
Returns
Returns a RowId that is the pointer to the row established in the table.
Exceptions
ArgumentExceptionIf the gven row does not belong to the table context.
ArgumentNullExceptionIf the given row is null.

Implemented in Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew, Deveel.Data.Transactions.TransactionTable, and Deveel.Data.Sql.Tables.UserContextTable.

void Deveel.Data.Sql.Tables.IMutableTable.AssertConstraints ( )

Performs all constraint integrity checks and actions to any modifications based on any changes that happened to the table since that last call to this method.

It is important that is called after any call to AddRow, RemoveRow or UpdateRow.

Any constraints that are marked as ConstraintDeferrability.InitiallyImmediate are checked when this is called, otherwise the constraint is checked at commit time.

Any referential actions are performed when this method is called. If a referential action causes a modification to another table, this method is recursively called on the table modified.

If a referential integrity constraint is violated and a referential action is unable to maintain the integrity of the database, any changes made to the table are reverted.

Implemented in Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew, Deveel.Data.Transactions.TransactionTable, and Deveel.Data.Sql.Tables.UserContextTable.

void Deveel.Data.Sql.Tables.IMutableTable.FlushIndexes ( )

Flushes all changes made on this table to the backing index scheme.

This is used during the commit phase of this objects lifetime. The transaction control mechanism has found that there are no clashes and now we need to commit the current table view to the conglomerate. Because this object may not update index information immediately, we call this to flush all the changes to the table to the backing index set.

When this method returns, the backing index-set of this view will be completely up to date.

Implemented in Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew, Deveel.Data.Transactions.TransactionTable, and Deveel.Data.Sql.Tables.UserContextTable.

void Deveel.Data.Sql.Tables.IMutableTable.RemoveLock ( )
bool Deveel.Data.Sql.Tables.IMutableTable.RemoveRow ( RowId  rowId)

Deletes row identified by the given coordinates from the table.

Parameters
rowIdThe unique identifier of the row to be removed.
Returns
Returns true if the row identified was found and removed, false otherwise.
Exceptions
ArgumentExceptionThrown if the given rowId does not belong to this table.

Implemented in Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew, Deveel.Data.Transactions.TransactionTable, and Deveel.Data.Sql.Tables.UserContextTable.

void Deveel.Data.Sql.Tables.IMutableTable.UpdateRow ( Row  row)

Updates the values of a row into the table.

Parameters
rowThe object containing the values to update.
Exceptions
ArgumentNullExceptionIf the given row is null.

Implemented in Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew, Deveel.Data.Transactions.TransactionTable, and Deveel.Data.Sql.Tables.UserContextTable.

Property Documentation

TableEventRegistry Deveel.Data.Sql.Tables.IMutableTable.EventRegistry
get

Definition at line 27 of file IMutableTable.cs.


The documentation for this interface was generated from the following file: