DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | Private Attributes | List of all members
Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew Class Reference
Inheritance diagram for Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew:
Deveel.Data.Sql.Tables.GeneratedTable Deveel.Data.Sql.Tables.IMutableTable Deveel.Data.Sql.Tables.ITable Deveel.Data.Sql.Tables.ITable Deveel.Data.Sql.IDbObject Deveel.Data.Sql.IDbObject

Public Member Functions

 TriggeredOldNew (IDatabaseContext dbContext, TableInfo tableInfo)
 
void SetData (Row row)
 
void SetReadOnly (bool flag)
 
override DataObject GetValue (long rowNumber, int columnOffset)
 Gets a single cell within the table that is located at the given column offset and row. More...
 
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...
 
void AddLock ()
 
void RemoveLock ()
 
- Public Member Functions inherited from Deveel.Data.Sql.Tables.GeneratedTable
IEnumerator< RowGetEnumerator ()
 
virtual ColumnIndex GetIndex (int columnOffset)
 Gets an index for given column that can be used to select values from this table. More...
 
void Dispose ()
 

Properties

override TableInfo TableInfo [get]
 
override int RowCount [get]
 
TableEventRegistry EventRegistry [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.GeneratedTable
IContext Context [get, private set]
 
ObjectName IDbObject. FullName [get]
 
DbObjectType IDbObject. ObjectType [get]
 
abstract TableInfo TableInfo [get]
 
abstract int RowCount [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...
 
- Properties inherited from Deveel.Data.Sql.Tables.IMutableTable
TableEventRegistry EventRegistry [get]
 

Private Attributes

readonly TableInfo tableInfo
 
Row data
 
bool readOnly
 

Additional Inherited Members

- Protected Member Functions inherited from Deveel.Data.Sql.Tables.GeneratedTable
 GeneratedTable (IContext dbContext)
 
DataObject GetColumnValue (int column, ISqlObject obj)
 
virtual void Dispose (bool disposing)
 

Detailed Description

Definition at line 433 of file Transaction.cs.

Constructor & Destructor Documentation

Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.TriggeredOldNew ( IDatabaseContext  dbContext,
TableInfo  tableInfo 
)
inline

Definition at line 438 of file Transaction.cs.

439  : base(dbContext) {
440  this.tableInfo = tableInfo;
441  }

Member Function Documentation

void Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.AddLock ( )
inline

Implements Deveel.Data.Sql.Tables.IMutableTable.

Definition at line 497 of file Transaction.cs.

497  {
498  }
RowId Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.AddRow ( Row  row)
inline

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.

Implements Deveel.Data.Sql.Tables.IMutableTable.

Definition at line 470 of file Transaction.cs.

470  {
471  throw new NotSupportedException(String.Format("Inserting data into '{0}' is not allowed.", tableInfo.TableName));
472  }
A long string in the system.
ObjectName TableName
Gets the fully qualified name of the table that is ensured to be unique within the system...
Definition: TableInfo.cs:97
void Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.AssertConstraints ( )
inline

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.

Implements Deveel.Data.Sql.Tables.IMutableTable.

Definition at line 494 of file Transaction.cs.

494  {
495  }
void Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.FlushIndexes ( )
inline

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.

Implements Deveel.Data.Sql.Tables.IMutableTable.

Definition at line 491 of file Transaction.cs.

491  {
492  }
override DataObject Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.GetValue ( long  rowNumber,
int  columnOffset 
)
inlinevirtual

Gets a single cell within the table that is located at the given column offset and row.

Parameters
rowNumberThe unique number of the row where the cell is located.
columnOffsetThe zero-based offset of the column of the cell to return.
Returns
Returns an instance of DataObject that is contained in the cell located by the row and column coordinates provided.
Exceptions
ArgumentOutOfRangeExceptionIf the given columnOffset is less than zero or greater or equal than the number of columns defined in the table metadata.
See also
Tables.TableInfo.IndexOfColumn(string)

Implements Deveel.Data.Sql.Tables.GeneratedTable.

Definition at line 459 of file Transaction.cs.

459  {
460  if (rowNumber < 0 || rowNumber >= 1)
461  throw new ArgumentOutOfRangeException("rowNumber");
462 
463  return data.GetValue(columnOffset);
464  }
DataObject GetValue(int columnOffset)
Gets or the value of a cell of the row at the given offset.
Definition: Row.cs:203
void Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.RemoveLock ( )
inline

Implements Deveel.Data.Sql.Tables.IMutableTable.

Definition at line 500 of file Transaction.cs.

500  {
501  }
bool Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.RemoveRow ( RowId  rowId)
inline

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.

Implements Deveel.Data.Sql.Tables.IMutableTable.

Definition at line 487 of file Transaction.cs.

487  {
488  throw new NotSupportedException(String.Format("Deleting data from '{0}' is not allowed.", tableInfo.TableName));
489  }
A long string in the system.
ObjectName TableName
Gets the fully qualified name of the table that is ensured to be unique within the system...
Definition: TableInfo.cs:97
void Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.SetData ( Row  row)
inline

Definition at line 451 of file Transaction.cs.

void Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.SetReadOnly ( bool  flag)
inline

Definition at line 455 of file Transaction.cs.

void Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.UpdateRow ( Row  row)
inline

Updates the values of a row into the table.

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

Implements Deveel.Data.Sql.Tables.IMutableTable.

Definition at line 474 of file Transaction.cs.

474  {
475  if (row.RowId.RowNumber < 0 ||
476  row.RowId.RowNumber >= 1)
477  throw new ArgumentOutOfRangeException();
478  if (readOnly)
479  throw new NotSupportedException(String.Format("Updating '{0}' is not permitted.", tableInfo.TableName));
480 
481  int sz = TableInfo.ColumnCount;
482  for (int i = 0; i < sz; ++i) {
483  data.SetValue(i, row.GetValue(i));
484  }
485  }
A long string in the system.
DataObject GetValue(int columnOffset)
Gets or the value of a cell of the row at the given offset.
Definition: Row.cs:203
int RowNumber
Gets the number of the column within the table referenced.
Definition: RowId.cs:58
ObjectName TableName
Gets the fully qualified name of the table that is ensured to be unique within the system...
Definition: TableInfo.cs:97
void SetValue(int columnOffset, DataObject value)
Sets the value of a cell of the row at the given offset.
Definition: Row.cs:247
int ColumnCount
Gets a count of the columns defined by this object.
Definition: TableInfo.cs:159
Defines the metadata properties of a table existing within a database.
Definition: TableInfo.cs:41
RowId RowId
Gets the row unique identifier within the database.
Definition: Row.cs:101

Member Data Documentation

Row Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.data
private

Definition at line 435 of file Transaction.cs.

bool Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.readOnly
private

Definition at line 436 of file Transaction.cs.

readonly TableInfo Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.tableInfo
private

Definition at line 434 of file Transaction.cs.

Property Documentation

TableEventRegistry Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.EventRegistry
get

Definition at line 466 of file Transaction.cs.

override int Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.RowCount
get

Definition at line 447 of file Transaction.cs.

override TableInfo Deveel.Data.Transactions.Transaction.OldAndNewTableContainer.TriggeredOldNew.TableInfo
get

Definition at line 443 of file Transaction.cs.


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