18 using System.Collections.Generic;
23 namespace Deveel.Data.Sql.Tables {
27 return ((IQueryTable)table).FindColumn(columnName);
29 var parent = columnName.
Parent;
38 return ((IQueryTable)table).ColumnCount;
45 return ((IQueryTable)table).GetResolvedColumnName(columnOffset);
48 var columnName = table.
TableInfo[columnOffset].ColumnName;
52 internal static IEnumerable<int>
ResolveRows(
this ITable table,
int columnOffset, IEnumerable<int> rows,
55 return ((IQueryTable)table).ResolveRows(columnOffset, rows, ancestor);
57 if (table != ancestor)
58 throw new ArgumentException();
65 return ((IQueryTable)thisTable).GetIndex(column, originalColumn, table);
67 var index = thisTable.
GetIndex(column);
68 if (table == thisTable)
72 return index.
GetSubset(table, originalColumn);
77 return ((IQueryTable)table).GetVariableResolver();
80 throw new NotImplementedException();
93 return ((IQueryTable)table).GetRawTableInfo(info);
95 throw new NotSupportedException();
100 ((IQueryTable)table).Lock();
105 ((IQueryTable)table).Release();
Defines the contract to access the data contained into a table of a database.
static RawTableInfo GetRawTableInfo(this ITable table)
static ObjectName ResolveColumnName(this ITable table, string columnName)
static void Lock(this ITable table)
static void Release(this ITable table)
static int ColumnCount(this ITable table)
Describes the name of an object within a database.
ObjectName TableName
Gets the fully qualified name of the table that is ensured to be unique within the system...
static IEnumerable< int > ResolveRows(this ITable table, int columnOffset, IEnumerable< int > rows, ITable ancestor)
static ColumnIndex GetIndex(this ITable thisTable, int column, int originalColumn, ITable table)
static ITableVariableResolver GetVariableResolver(this ITable table)
TableInfo TableInfo
Gets the metadata information of the table, used to resolve the column sources.
static RawTableInfo GetRawTableInfo(this ITable table, RawTableInfo info)
int IndexOfColumn(string columnName)
Gets the offset of the column with the given name.
ObjectName Parent
Gets the parent reference of the current one, if any or null if none.
static ObjectName GetResolvedColumnName(this ITable table, int columnOffset)
string Name
Gets the name of the object being referenced.
static int FindColumn(this ITable table, ObjectName columnName)
int ColumnCount
Gets a count of the columns defined by this object.
ColumnIndex GetIndex(int column, int originalColumn, ITable table)
virtual ColumnIndex GetSubset(ITable subsetTable, int subsetColumn)