/** * Gets the result set metadata of the query returned when the statement is * executed. If this is not a query, this method returns null. * * @return the meta data or null if this is not a query * @throws SQLException if this object is closed */ @Override public ResultSetMetaData getMetaData() throws SQLException { try { debugCodeCall("getMetaData"); checkClosed(); ResultInterface result = command.getMetaData(); if (result == null) { return null; } int id = getNextId(TraceObject.RESULT_SET_META_DATA); if (isDebugEnabled()) { debugCodeAssign("ResultSetMetaData", TraceObject.RESULT_SET_META_DATA, id, "getMetaData()"); } String catalog = conn.getCatalog(); JdbcResultSetMetaData meta = new JdbcResultSetMetaData( null, this, result, catalog, session.getTrace(), id); return meta; } catch (Exception e) { throw logAndConvert(e); } }