public int getStatementParameterCount()

in asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBProtocolBase.java [208:225]


    public int getStatementParameterCount(QueryServiceResponse response) throws SQLException {
        QueryServiceResponse.Plans plans = response.plans;
        if (plans == null) {
            throw getErrorReporter().errorInProtocol();
        }
        if (plans.statementParameters == null) {
            return 0;
        }
        int paramPos = 0;
        for (Object param : plans.statementParameters) {
            if (param instanceof Number) {
                paramPos = Math.max(paramPos, ((Number) param).intValue());
            } else {
                throw getErrorReporter().errorParameterNotSupported(String.valueOf(param));
            }
        }
        return paramPos;
    }