Class SqlAbstractSystemView
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.h2.sys.view.SqlAbstractSystemView
-
- All Implemented Interfaces:
SqlSystemView
- Direct Known Subclasses:
SqlAbstractLocalSystemView
public abstract class SqlAbstractSystemView extends Object implements SqlSystemView
Meta view base class.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.h2.table.Column[]colsColumns.protected GridKernalContextctxGrid context.protected static longDEFAULT_ROW_COUNT_APPROXIMATIONDefault row count approximation.protected StringdescDescription.protected String[]indexesIndexed column names.protected IgniteLoggerlogLogger.protected StringtblNameTable name.
-
Constructor Summary
Constructors Constructor Description SqlAbstractSystemView(String tblName, String desc, GridKernalContext ctx, org.h2.table.Column[] cols, String[] indexes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanGetRowCount()Check if the row count can be retrieved quickly.org.h2.table.Column[]getColumns()Gets columns.StringgetCreateSQL()Gets SQL script for creating table.StringgetDescription()Gets description.String[]getIndexes()Gets indexed column names.longgetRowCount()Gets row count for this view (or approximated row count, if real value can't be calculated quickly).longgetRowCountApproximation()Gets approximated row count (required to build execution plan).StringgetTableName()Gets table name.protected static org.h2.table.ColumnnewColumn(String name)protected static org.h2.table.ColumnnewColumn(String name, int type)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemView
getRows, isDistributed
-
-
-
-
Field Detail
-
DEFAULT_ROW_COUNT_APPROXIMATION
protected static final long DEFAULT_ROW_COUNT_APPROXIMATION
Default row count approximation.- See Also:
- Constant Field Values
-
tblName
protected final String tblName
Table name.
-
desc
protected final String desc
Description.
-
ctx
protected final GridKernalContext ctx
Grid context.
-
log
protected final IgniteLogger log
Logger.
-
cols
protected final org.h2.table.Column[] cols
Columns.
-
indexes
protected final String[] indexes
Indexed column names.
-
-
Constructor Detail
-
SqlAbstractSystemView
public SqlAbstractSystemView(String tblName, String desc, GridKernalContext ctx, org.h2.table.Column[] cols, String[] indexes)
- Parameters:
tblName- Table name.desc- Descriptor.ctx- Context.cols- Columns.indexes- Indexes.
-
-
Method Detail
-
newColumn
protected static org.h2.table.Column newColumn(String name)
- Parameters:
name- Name.
-
newColumn
protected static org.h2.table.Column newColumn(String name, int type)
- Parameters:
name- Name.type- Type.
-
getTableName
public String getTableName()
Gets table name.- Specified by:
getTableNamein interfaceSqlSystemView
-
getDescription
public String getDescription()
Gets description.- Specified by:
getDescriptionin interfaceSqlSystemView
-
getColumns
public org.h2.table.Column[] getColumns()
Gets columns.- Specified by:
getColumnsin interfaceSqlSystemView
-
getIndexes
public String[] getIndexes()
Gets indexed column names.- Specified by:
getIndexesin interfaceSqlSystemView
-
getRowCount
public long getRowCount()
Gets row count for this view (or approximated row count, if real value can't be calculated quickly).- Specified by:
getRowCountin interfaceSqlSystemView
-
getRowCountApproximation
public long getRowCountApproximation()
Gets approximated row count (required to build execution plan).- Specified by:
getRowCountApproximationin interfaceSqlSystemView
-
canGetRowCount
public boolean canGetRowCount()
Check if the row count can be retrieved quickly.- Specified by:
canGetRowCountin interfaceSqlSystemView- Returns:
- true if it can
-
getCreateSQL
public String getCreateSQL()
Gets SQL script for creating table.- Specified by:
getCreateSQLin interfaceSqlSystemView
-
-