Iterator tables;
Table table;
Object[] row;
// DITableInfo ti;
TextCache tc;
// column number mappings
final int itable_cat = 0;
final int itable_schem = 1;
final int itable_name = 2;
final int idsd = 3;
final int ifile_path = 4;
final int ifile_enc = 5;
final int ifs = 6;
final int ivfs = 7;
final int ilvfs = 8;
final int iif = 9;
final int iiq = 10;
final int iiaq = 11;
final int iid = 12;
// Initialization
tables = database.schemaManager.allTablesIterator();
// Do it.
while (tables.hasNext()) {
table = (Table) tables.next();
if (!table.isText() ||!isAccessibleTable(table)) {
continue;
}
row = t.getEmptyRowData();
row[itable_cat] = ns.getCatalogName(table);
row[itable_schem] = table.getSchemaName();
row[itable_name] = table.getName().name;
if (table.getCache() != null
&& table.getCache() instanceof TextCache) {
tc = (TextCache) table.getCache();
row[idsd] = table.getDataSource();
row[ifile_path] =
FileUtil.canonicalOrAbsolutePath(tc.getFileName());
row[ifile_enc] = tc.stringEncoding;
row[ifs] = tc.fs;
row[ivfs] = tc.vs;
row[ilvfs] = tc.lvs;
row[iif] = ValuePool.getBoolean(tc.ignoreFirst);