Source:
<code>public DescribeResult describe(char type, String portalOrStatement) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("method=describe type={} portalOrStatement={}", type, portalOrStatement); } switch (type) { case 'P': Portal portal = getSafePortal(portalOrStatement); AnalyzedStatement analyzedStmt = portal.boundOrUnboundStatement(); if (analyzedStmt instanceof AnalyzedRelation) { return new DescribeResult(((AnalyzedRelation) analyzedStmt).fields()); <START> } else if (analyzedStmt instanceof AnalyzedUpdateStatement) { <END> return new DescribeResult(((AnalyzedUpdateStatement) analyzedStmt).fields()); } else { return new DescribeResult(null); } case 'S': PreparedStmt preparedStmt = preparedStatements.get(portalOrStatement); Statement statement = preparedStmt.parsedStatement(); AnalyzedStatement analyzedStatement; if (preparedStmt.isRelationInitialized()) { analyzedStatement = preparedStmt.unboundStatement(); } else { analyzedStatement = analyzer.unboundAnalyze(statement, sessionContext, preparedStmt.paramTypes()); preparedStmt.unboundStatement(analyzedStatement); } if (analyzedStatement == null) { return new DescribeResult(null); } DataType[] parameterSymbols = parameterTypeExtractor.getParameterTypes(x -> Relations.traverseDeepSymbols(analyzedStatement, x)); if (parameterSymbols.length > 0) { preparedStmt.setDescribedParameters(parameterSymbols); } if (analyzedStatement instanceof AnalyzedRelation) { AnalyzedRelation relation = (AnalyzedRelation) analyzedStatement; return new DescribeResult(relation.fields(), parameterSymbols); } if (analyzedStatement instanceof AnalyzedUpdateStatement) { AnalyzedUpdateStatement update = (AnalyzedUpdateStatement) analyzedStatement; List<Field> fields = update.fields(); return new DescribeResult(fields, parameterSymbols); } return new DescribeResult(null, parameterSymbols); default: throw new AssertionError("Unsupported type: " + type); } }</code><technical_language>Sounds reasonable, I ResultSetStatement describes iface (maybe name?)</technical_language>

Target:
public DescribeResult describe(char type, String portalOrStatement) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("method=describe type={} portalOrStatement={}", type, portalOrStatement); } switch (type) { case 'P': Portal portal = getSafePortal(portalOrStatement); AnalyzedStatement analyzedStmt = portal.boundOrUnboundStatement(); return new DescribeResult(analyzedStmt.fields()); case 'S': PreparedStmt preparedStmt = preparedStatements.get(portalOrStatement); Statement statement = preparedStmt.parsedStatement(); AnalyzedStatement analyzedStatement; if (preparedStmt.isRelationInitialized()) { analyzedStatement = preparedStmt.unboundStatement(); } else { analyzedStatement = analyzer.unboundAnalyze(statement, sessionContext, preparedStmt.paramTypes()); preparedStmt.unboundStatement(analyzedStatement); } if (analyzedStatement == null) { return new DescribeResult(null); } DataType[] parameterSymbols = parameterTypeExtractor.getParameterTypes(x -> Relations.traverseDeepSymbols(analyzedStatement, x)); if (parameterSymbols.length > 0) { preparedStmt.setDescribedParameters(parameterSymbols); } return new DescribeResult(analyzedStatement.fields(), parameterSymbols); default: throw new AssertionError("Unsupported type: " + type); } }