use of org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement in project dbeaver by serge-rider.
the class DB2TableCache method prepareChildrenStatement.
@Override
protected JDBCStatement prepareChildrenStatement(@NotNull JDBCSession session, @NotNull DB2Schema db2Schema, @Nullable DB2Table forTable) throws SQLException {
String sql;
if (forTable != null) {
sql = SQL_COLS_TAB;
} else {
sql = SQL_COLS_ALL;
}
JDBCPreparedStatement dbStat = session.prepareStatement(sql);
dbStat.setString(1, db2Schema.getName());
if (forTable != null) {
dbStat.setString(2, forTable.getName());
}
return dbStat;
}
use of org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement in project dbeaver by serge-rider.
the class DB2TableCheckConstraintCache method prepareObjectsStatement.
@NotNull
@Override
protected JDBCStatement prepareObjectsStatement(JDBCSession session, DB2Schema db2Schema, DB2Table forTable) throws SQLException {
String sql;
if (forTable != null) {
sql = SQL_CK_TAB;
} else {
sql = SQL_CK_ALL;
}
JDBCPreparedStatement dbStat = session.prepareStatement(sql);
dbStat.setString(1, db2Schema.getName());
if (forTable != null) {
dbStat.setString(2, forTable.getName());
}
return dbStat;
}
use of org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement in project dbeaver by serge-rider.
the class DB2TableIndexCache method prepareObjectsStatement.
@Override
protected JDBCStatement prepareObjectsStatement(@NotNull JDBCSession session, @NotNull DB2TableBase db2Table) throws SQLException {
final JDBCPreparedStatement dbStat = session.prepareStatement(SQL_INDS_TAB);
dbStat.setString(1, db2Table.getSchema().getName());
dbStat.setString(2, db2Table.getName());
return dbStat;
}
use of org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement in project dbeaver by serge-rider.
the class DB2TableReferenceCache method prepareObjectsStatement.
@NotNull
@Override
protected JDBCStatement prepareObjectsStatement(JDBCSession session, DB2Schema db2Schema, DB2Table forTable) throws SQLException {
String sql;
if (forTable != null) {
sql = SQL_REF_TAB;
} else {
sql = SQL_REF_ALL;
}
JDBCPreparedStatement dbStat = session.prepareStatement(sql);
dbStat.setString(1, db2Schema.getName());
if (forTable != null) {
dbStat.setString(2, forTable.getName());
}
return dbStat;
}
use of org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement in project dbeaver by serge-rider.
the class DB2TableForeignKeyCache method prepareObjectsStatement.
@NotNull
@Override
protected JDBCStatement prepareObjectsStatement(JDBCSession session, DB2Schema db2Schema, DB2Table forTable) throws SQLException {
String sql;
if (forTable != null) {
sql = SQL_FK_TAB;
} else {
sql = SQL_FK_ALL;
}
JDBCPreparedStatement dbStat = session.prepareStatement(sql);
dbStat.setString(1, db2Schema.getName());
if (forTable != null) {
dbStat.setString(2, forTable.getName());
}
return dbStat;
}
Aggregations