DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Classes | Public Member Functions | Properties | Private Member Functions | List of all members
Deveel.Data.Sql.Tables.LimitedTable Class Reference
Inheritance diagram for Deveel.Data.Sql.Tables.LimitedTable:
Deveel.Data.Sql.Tables.FilterTable Deveel.Data.Sql.Tables.Table Deveel.Data.Sql.Tables.IQueryTable Deveel.Data.Transactions.ILockable Deveel.Data.Sql.Tables.ITable Deveel.Data.Sql.IDbObject

Classes

class  Enumerator
 

Public Member Functions

 LimitedTable (ITable parent, long offset, long total)
 
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...
 
override IEnumerator< RowGetEnumerator ()
 
- Public Member Functions inherited from Deveel.Data.Sql.Tables.FilterTable
 FilterTable (ITable parent)
 
override void Lock ()
 
override void Release ()
 
- Public Member Functions inherited from Deveel.Data.Sql.Tables.Table
void Dispose ()
 
ColumnIndex GetIndex (int columnOffset)
 Gets an index for given column that can be used to select values from this table. More...
 

Properties

long Offset [get, private set]
 
long Total [get, private set]
 
override int RowCount [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.FilterTable
ITable Parent [get, private set]
 
override IContext Context [get]
 
override TableInfo TableInfo [get]
 
override int RowCount [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.Table
abstract IContext Context [get]
 
abstract TableInfo TableInfo [get]
 
bool IsLocked [get, private set]
 
object ILockable. RefId [get]
 
int IQueryTable. ColumnCount [get]
 
virtual int ColumnCount [get]
 
abstract int RowCount [get]
 
ObjectName FullName [get]
 
DbObjectType IDbObject. ObjectType [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.IQueryTable
int ColumnCount [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.Transactions.ILockable
object RefId [get]
 

Private Member Functions

long NormalizeRow (long rowNumber)
 
int NormalizeCount (long count)
 

Additional Inherited Members

- Protected Member Functions inherited from Deveel.Data.Sql.Tables.FilterTable
override RawTableInfo GetRawTableInfo (RawTableInfo rootInfo)
 
override ColumnIndex GetIndex (int column, int originalColumn, ITable table)
 
override IEnumerable< int > ResolveRows (int column, IEnumerable< int > rowSet, ITable ancestor)
 
override ObjectName GetResolvedColumnName (int column)
 
- Protected Member Functions inherited from Deveel.Data.Sql.Tables.Table
virtual void Dispose (bool disposing)
 
virtual void OnLockAcquired (Lock @lock)
 
virtual void OnLockReleased (Lock @lock)
 
virtual int IndexOfColumn (ObjectName columnName)
 
int FindColumn (ObjectName columnName)
 

Detailed Description

Definition at line 22 of file LimitedTable.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Tables.LimitedTable.LimitedTable ( ITable  parent,
long  offset,
long  total 
)
inline

Definition at line 27 of file LimitedTable.cs.

28  : base(parent) {
29  if (offset < 0)
30  offset = 0;
31 
32  Offset = offset;
33  Total = total;
34  }

Member Function Documentation

override IEnumerator<Row> Deveel.Data.Sql.Tables.LimitedTable.GetEnumerator ( )
inlinevirtual

Reimplemented from Deveel.Data.Sql.Tables.FilterTable.

Definition at line 57 of file LimitedTable.cs.

57  {
58  return new Enumerator(this);
59  }
override DataObject Deveel.Data.Sql.Tables.LimitedTable.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)

Reimplemented from Deveel.Data.Sql.Tables.FilterTable.

Definition at line 50 of file LimitedTable.cs.

50  {
51  if (rowNumber >= RowCount)
52  throw new ArgumentOutOfRangeException("rowNumber");
53 
54  return base.GetValue(NormalizeRow(rowNumber), columnOffset);
55  }
long NormalizeRow(long rowNumber)
Definition: LimitedTable.cs:36
int Deveel.Data.Sql.Tables.LimitedTable.NormalizeCount ( long  count)
inlineprivate

Definition at line 41 of file LimitedTable.cs.

41  {
42  count -= Offset;
43  return (int) System.Math.Min(count, Total);
44  }
long Deveel.Data.Sql.Tables.LimitedTable.NormalizeRow ( long  rowNumber)
inlineprivate

Definition at line 36 of file LimitedTable.cs.

36  {
37  rowNumber += Offset;
38  return rowNumber;
39  }

Property Documentation

long Deveel.Data.Sql.Tables.LimitedTable.Offset
getprivate set

Definition at line 23 of file LimitedTable.cs.

override int Deveel.Data.Sql.Tables.LimitedTable.RowCount
get

Definition at line 46 of file LimitedTable.cs.

long Deveel.Data.Sql.Tables.LimitedTable.Total
getprivate set

Definition at line 25 of file LimitedTable.cs.


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