static String getTableName(JdbcTable table) { // tableName is: [catalog,] [schema,] table SqlIdentifier identifier = table.tableName(); return identifier.names.get(identifier.names.size() - 1); }
/** @see #dispatch */ public Result visit(JdbcTableScan scan) { return result(scan.jdbcTable.tableName(), ImmutableList.of(Clause.FROM), scan, null); }
public JdbcImplementor.Result implement(JdbcImplementor implementor) { return implementor.result(jdbcTable.tableName(), ImmutableList.of(JdbcImplementor.Clause.FROM), this, null); } }
/** @see #dispatch */ public Result visit(JdbcTableScan scan) { return result(scan.jdbcTable.tableName(), ImmutableList.of(Clause.FROM), scan, null); }
public JdbcImplementor.Result implement(JdbcImplementor implementor) { return implementor.result(jdbcTable.tableName(), ImmutableList.of(JdbcImplementor.Clause.FROM), this, null); } }
SqlString generateSql() { final SqlNodeList selectList = new SqlNodeList( Collections.singletonList(SqlIdentifier.star(SqlParserPos.ZERO)), SqlParserPos.ZERO); SqlSelect node = new SqlSelect(SqlParserPos.ZERO, SqlNodeList.EMPTY, selectList, tableName(), null, null, null, null, null, null, null); final SqlPrettyWriter writer = new SqlPrettyWriter(jdbcSchema.dialect); node.unparse(writer, 0, 0); return writer.toSqlString(); }
SqlString generateSql() { final SqlNodeList selectList = new SqlNodeList( Collections.singletonList(SqlIdentifier.star(SqlParserPos.ZERO)), SqlParserPos.ZERO); SqlSelect node = new SqlSelect(SqlParserPos.ZERO, SqlNodeList.EMPTY, selectList, tableName(), null, null, null, null, null, null, null); final SqlPrettyWriter writer = new SqlPrettyWriter(jdbcSchema.dialect); node.unparse(writer, 0, 0); return writer.toSqlString(); }