String tableType = (table.getName().inSystemSchema() ? "SYSTEM " : "") +
(table.hasMemoryTableFactory() ? "VIEW" : "TABLE");
final Integer ordinal = table.hasMemoryTableFactory() ? null : table.getOrdinal();
final boolean isInsertable = !table.hasMemoryTableFactory();
if(isAccessible(session, table.getName())) {
return new ValuesRow(rowType,
null, //catalog
table.getName().getSchemaName(),
table.getName().getTableName(),
tableType,
null, // self reference column
null, // reference generation
boolResult(isInsertable),
boolResult(false), // is types
null, //commit action
null, // charset catalog
null,
table.getDefaultedCharsetName().toLowerCase(),
null, // collation catalog
null,
table.getDefaultedCollationName().toLowerCase(),
table.getTableId(),
ordinal,
table.getGroup().getStorageNameString(),
table.getGroup().getStorageDescription().getStorageFormat(),
++rowCounter /*hidden pk*/);
}
}
viewIt = getAIS(session).getViews().values().iterator();
}
while(viewIt.hasNext()) {
View view = viewIt.next();
if(isAccessible(session, view.getName())) {
return new ValuesRow(rowType,
null,
view.getName().getSchemaName(),
view.getName().getTableName(),
"VIEW",
null, //self reference