Search in sources :

Example 6 with JDBCStatementImpl

use of org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl in project dbeaver by serge-rider.

the class ExasolViewCache method prepareChildrenStatement.

@SuppressWarnings("rawtypes")
@Override
protected JDBCStatement prepareChildrenStatement(@NotNull JDBCSession session, @NotNull ExasolSchema exasolSchema, @Nullable ExasolView forView) throws SQLException {
    String sql;
    if (forView != null) {
        sql = String.format(SQL_COLS_VIEW, ExasolUtils.quoteString(exasolSchema.getName()), ExasolUtils.quoteString(forView.getName()));
    } else {
        sql = String.format(SQL_COLS_ALL, ExasolUtils.quoteString(exasolSchema.getName()));
    }
    JDBCStatement dbStat = session.createStatement();
    ((JDBCStatementImpl) dbStat).setQueryString(sql);
    return dbStat;
}
Also used : JDBCStatement(org.jkiss.dbeaver.model.exec.jdbc.JDBCStatement) JDBCStatementImpl(org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl)

Aggregations

JDBCStatement (org.jkiss.dbeaver.model.exec.jdbc.JDBCStatement)6 JDBCStatementImpl (org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl)6 NotNull (org.jkiss.code.NotNull)2