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

Public Member Functions

 VirtualTable (IEnumerable< ITable > tables)
 
 VirtualTable (IEnumerable< ITable > tables, IList< IList< int >> rows)
 
 VirtualTable (ITable table)
 
 VirtualTable (ITable table, IList< int > rows)
 
- Public Member Functions inherited from Deveel.Data.Sql.Tables.JoinedTable
 JoinedTable (IEnumerable< ITable > tables)
 
 JoinedTable (ITable table)
 
override void Lock ()
 
override void Release ()
 
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.Table
void Dispose ()
 
ColumnIndex GetIndex (int columnOffset)
 Gets an index for given column that can be used to select values from this table. More...
 

Protected Member Functions

override void Init (IEnumerable< ITable > tables)
 
override IEnumerable< int > ResolveRowsForTable (IEnumerable< int > rows, int tableNum)
 
- Protected Member Functions inherited from Deveel.Data.Sql.Tables.JoinedTable
override int IndexOfColumn (ObjectName columnName)
 
override RawTableInfo GetRawTableInfo (RawTableInfo rootInfo)
 
override ObjectName GetResolvedColumnName (int column)
 
override ColumnIndex GetIndex (int column, int originalColumn, ITable table)
 
override IEnumerable< int > ResolveRows (int column, IEnumerable< int > rowSet, ITable ancestor)
 
int ResolveRowForTable (int rowNumber, int tableNum)
 
- 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)
 
int FindColumn (ObjectName columnName)
 

Properties

override int RowCount [get]
 
IList< int >[] ReferenceRows [get]
 
- Properties inherited from Deveel.Data.Sql.Tables.JoinedTable
ColumnIndex[] ColumnIndices [get]
 
int[] ColumnTable [get]
 
int[] ColumnFilter [get]
 
override int ColumnCount [get]
 
override IContext Context [get]
 
override TableInfo TableInfo [get]
 
ITable[] ReferenceTables [get]
 
int SortColumn [get, set]
 
- 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

void SetRows (IList< IList< int >> rows)
 

Private Attributes

IList< int >[] rowList
 
int rowCount
 

Detailed Description

Definition at line 22 of file VirtualTable.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Tables.VirtualTable.VirtualTable ( IEnumerable< ITable tables)
inline

Definition at line 26 of file VirtualTable.cs.

27  : this(tables, null) {
28  }
Deveel.Data.Sql.Tables.VirtualTable.VirtualTable ( IEnumerable< ITable tables,
IList< IList< int >>  rows 
)
inline

Definition at line 30 of file VirtualTable.cs.

31  : base(tables) {
32  SetRows(rows);
33  }
void SetRows(IList< IList< int >> rows)
Definition: VirtualTable.cs:44
Deveel.Data.Sql.Tables.VirtualTable.VirtualTable ( ITable  table)
inline

Definition at line 35 of file VirtualTable.cs.

36  : this(table, null) {
37  }
Deveel.Data.Sql.Tables.VirtualTable.VirtualTable ( ITable  table,
IList< int >  rows 
)
inline

Definition at line 39 of file VirtualTable.cs.

40  : base(table) {
41  SetRows(new []{rows});
42  }
void SetRows(IList< IList< int >> rows)
Definition: VirtualTable.cs:44

Member Function Documentation

override void Deveel.Data.Sql.Tables.VirtualTable.Init ( IEnumerable< ITable tables)
inlineprotectedvirtual

Reimplemented from Deveel.Data.Sql.Tables.JoinedTable.

Definition at line 55 of file VirtualTable.cs.

55  {
56  var tableList = tables.ToList();
57  base.Init(tableList);
58 
59  int tableCount = tableList.Count;
60  rowList = new IList<int>[tableCount];
61  for (int i = 0; i < tableCount; ++i) {
62  rowList[i] = new List<int>();
63  }
64  }
override IEnumerable<int> Deveel.Data.Sql.Tables.VirtualTable.ResolveRowsForTable ( IEnumerable< int >  rows,
int  tableNum 
)
inlineprotectedvirtual

Implements Deveel.Data.Sql.Tables.JoinedTable.

Definition at line 74 of file VirtualTable.cs.

74  {
75  var rowSet = rows.ToList();
76  IList<int> curRowList = rowList[tableNum];
77  for (int n = rowSet.Count - 1; n >= 0; --n) {
78  int aa = rowSet[n];
79  int bb = curRowList[aa];
80  rowSet[n] = bb;
81  }
82 
83  return rowSet.ToArray();
84  }
void Deveel.Data.Sql.Tables.VirtualTable.SetRows ( IList< IList< int >>  rows)
inlineprivate

Definition at line 44 of file VirtualTable.cs.

44  {
45  var tableList = ReferenceTables.ToList();
46 
47  for (int i = 0; i < tableList.Count; ++i) {
48  rowList[i] = new List<int>(rows[i]);
49  }
50  if (rows.Count > 0) {
51  rowCount = rows[0].Count();
52  }
53  }

Member Data Documentation

int Deveel.Data.Sql.Tables.VirtualTable.rowCount
private

Definition at line 24 of file VirtualTable.cs.

IList<int> [] Deveel.Data.Sql.Tables.VirtualTable.rowList
private

Definition at line 23 of file VirtualTable.cs.

Property Documentation

IList<int> [] Deveel.Data.Sql.Tables.VirtualTable.ReferenceRows
getprotected

Definition at line 70 of file VirtualTable.cs.

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

Definition at line 66 of file VirtualTable.cs.


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