List of usage examples for java.sql DatabaseMetaData getFunctionColumns
ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern,
String columnNamePattern) throws SQLException;
From source file:org.wso2.carbon.dataservices.core.description.query.SQLQuery.java
private Object[] getStoredProcFuncProps(String name) throws DataServiceFault, SQLException { Connection conn = this.getConfig().createConnection(); DatabaseMetaData md = conn.getMetaData(); ResultSet rs = null;/*from w w w . j a v a 2 s . c o m*/ boolean error = true; try { rs = md.getProcedureColumns(null, null, name, "%"); Object[] resultMap = new Object[2]; if (!rs.next()) { rs.close(); rs = md.getFunctionColumns(null, null, name, "%"); } else { rs.close(); rs = md.getProcedureColumns(null, null, name, "%"); } resultMap[0] = conn; resultMap[1] = rs; error = false; return resultMap; } finally { if (error) { this.releaseResources(rs, null); } } }