use of org.dbflute.helper.jdbc.facade.DfJdbcFacade in project dbflute-core by dbflute.
the class DfSynonymExtractorOracle method judgeSynonymSelectable.
protected void judgeSynonymSelectable(DfSynonymMeta info) {
final DfJdbcFacade facade = new DfJdbcFacade(_dataSource);
final String synonymSqlName = info.buildSynonymSqlName();
final String sql = "select * from " + synonymSqlName + " where 0 = 1";
try {
final List<String> columnList = new ArrayList<String>();
columnList.add("dummy");
facade.selectStringList(sql, columnList);
info.setSelectable(true);
} catch (RuntimeException ignored) {
info.setSelectable(false);
}
}
use of org.dbflute.helper.jdbc.facade.DfJdbcFacade in project dbflute-core by dbflute.
the class DfArrayExtractorOracle method selectFirstArray.
protected List<Map<String, String>> selectFirstArray(UnifiedSchema unifiedSchema) {
final DfJdbcFacade facade = new DfJdbcFacade(_dataSource);
final List<String> columnList = new ArrayList<String>();
columnList.add("TYPE_NAME");
columnList.add("COLL_TYPE");
columnList.add("ELEM_TYPE_OWNER");
columnList.add("ELEM_TYPE_NAME");
columnList.add("LENGTH");
columnList.add("PRECISION");
columnList.add("SCALE");
final String sql = buildFirstArraySql(unifiedSchema);
final List<Map<String, String>> resultList;
try {
log(sql);
resultList = facade.selectStringList(sql, columnList);
} catch (Exception continued) {
// because it's basically assist info
log("Failed to select first array info: " + continued.getMessage());
return DfCollectionUtil.emptyList();
}
return resultList;
}
use of org.dbflute.helper.jdbc.facade.DfJdbcFacade in project dbflute-core by dbflute.
the class DfStructExtractorOracle method selectStructAttribute.
protected List<Map<String, String>> selectStructAttribute(UnifiedSchema unifiedSchema) {
final DfJdbcFacade facade = new DfJdbcFacade(_dataSource);
final List<String> columnList = new ArrayList<String>();
columnList.add("TYPE_NAME");
columnList.add("ATTR_NAME");
columnList.add("ATTR_TYPE_OWNER");
columnList.add("ATTR_TYPE_NAME");
columnList.add("LENGTH");
columnList.add("PRECISION");
columnList.add("SCALE");
columnList.add("ATTR_NO");
final String sql = buildStructAttributeSql(unifiedSchema);
final List<Map<String, String>> resultList;
try {
log(sql);
resultList = facade.selectStringList(sql, columnList);
} catch (Exception continued) {
// because of assist info
log("Failed to select supplement info: " + continued.getMessage());
return DfCollectionUtil.emptyList();
}
return resultList;
}
Aggregations