use of org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl in project dbeaver by serge-rider.
the class ExasolTableCache method prepareChildrenStatement.
@SuppressWarnings("rawtypes")
@Override
protected JDBCStatement prepareChildrenStatement(@NotNull JDBCSession session, @NotNull ExasolSchema exasolSchema, @Nullable ExasolTable exasolTable) throws SQLException {
String sql;
if (exasolTable != null)
sql = String.format(SQL_COLS_TAB, ExasolUtils.quoteString(exasolSchema.getName()), ExasolUtils.quoteString(exasolTable.getName()));
else
sql = String.format(SQL_COLS_ALL, ExasolUtils.quoteString(exasolSchema.getName()));
JDBCStatement dbstat = session.createStatement();
((JDBCStatementImpl) dbstat).setQueryString(sql);
return dbstat;
}
use of org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl in project dbeaver by serge-rider.
the class ExasolTableUniqueKeyCache method prepareObjectsStatement.
@SuppressWarnings("rawtypes")
@NotNull
@Override
protected JDBCStatement prepareObjectsStatement(JDBCSession session, ExasolSchema exasolSchema, ExasolTable forTable) throws SQLException {
String sql;
if (forTable != null) {
sql = String.format(SQL_UK_TAB, ExasolUtils.quoteString(exasolSchema.getName()), ExasolUtils.quoteString(forTable.getName()));
} else {
sql = String.format(SQL_UK_ALL, ExasolUtils.quoteString(exasolSchema.getName()));
}
JDBCStatement dbStat = session.createStatement();
((JDBCStatementImpl) dbStat).setQueryString(sql);
return dbStat;
}
use of org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl in project dbeaver by serge-rider.
the class ExasolJDBCObjectSimpleCacheLiterals method prepareObjectsStatement.
@SuppressWarnings("rawtypes")
@Override
protected JDBCStatement prepareObjectsStatement(@NotNull JDBCSession session, @NotNull OWNER owner) throws SQLException {
JDBCStatement dbStat = session.createStatement();
//escape parameters
for (int i = 0; i < queryParameters.length; i++) {
queryParameters[i] = (Object) ExasolUtils.quoteString(queryParameters[i].toString());
}
executeQuery = String.format(query, queryParameters);
((JDBCStatementImpl) dbStat).setQueryString(executeQuery);
return dbStat;
}
use of org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl in project dbeaver by serge-rider.
the class ExasolTableForeignKeyCache method prepareObjectsStatement.
@SuppressWarnings("rawtypes")
@NotNull
@Override
protected JDBCStatement prepareObjectsStatement(JDBCSession session, ExasolSchema exasolSchema, ExasolTable forTable) throws SQLException {
String sql;
if (forTable != null) {
sql = String.format(SQL_FK_TAB, ExasolUtils.quoteString(exasolSchema.getName()), ExasolUtils.quoteString(forTable.getName()));
} else {
sql = String.format(SQL_FK_ALL, ExasolUtils.quoteString(exasolSchema.getName()));
}
JDBCStatement dbStat = session.createStatement();
((JDBCStatementImpl) dbStat).setQueryString(sql);
return dbStat;
}
use of org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl in project dbeaver by serge-rider.
the class ExasolViewCache method prepareObjectsStatement.
@SuppressWarnings("rawtypes")
@Override
protected JDBCStatement prepareObjectsStatement(@NotNull JDBCSession session, @NotNull ExasolSchema exasolSchema) throws SQLException {
JDBCStatement dbStat = session.createStatement();
String sql = String.format(SQL_VIEWS, ExasolUtils.quoteString(exasolSchema.getName()), ExasolUtils.quoteString(exasolSchema.getName()));
((JDBCStatementImpl) dbStat).setQueryString(sql);
return dbStat;
}
Aggregations