Interface RegProcedure.Lookup

Enclosing interface:
RegProcedure<M extends RegProcedure.Memo<M>>

public static interface RegProcedure.Lookup
Counterpart to the PostgreSQL FmgrInfo.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if a routine with a variadic parameter declared with the wildcard "any" type is being called with its arguments in "spread" form at this call site.
    A TupleDescriptor describing the incoming arguments, with any polymorphic types from the routine's declaration resolved to the actual types at this call site.
    A TupleDescriptor describing the expected result, with any polymorphic types from the routine's declaration resolved to the actual types at this call site.
    stableInputs(BitSet ofInterest)
    For the arguments at (zero-based) positions in arguments() indicated by ofInterest, report (in the returned bit set) which of those are 'stable', that is, will keep their values across calls associated with the current Lookup.
    The PostgreSQL function or procedure being called.
  • Method Details

    • target

      RegProcedure<?> target()
      The PostgreSQL function or procedure being called.
    • inputsDescriptor

      TupleDescriptor inputsDescriptor() throws SQLException
      A TupleDescriptor describing the incoming arguments, with any polymorphic types from the routine's declaration resolved to the actual types at this call site.

      If there are no polymorphic types among the routine's declared parameters, an unchanged TupleDescriptor cached with the routine may be returned.

      See inputsAreSpread for one case where the size() of this TupleDescriptor can exceed the size() of a TupleDescriptor constructed from the routine's declaration.

      Throws:
      SQLException
    • outputsDescriptor

      TupleDescriptor outputsDescriptor() throws SQLException
      A TupleDescriptor describing the expected result, with any polymorphic types from the routine's declaration resolved to the actual types at this call site.

      Returns null if the routine has a declared return type of VOID and does not need to return anything.

      If there are no polymorphic types among the routine's declared outputs, an unchanged TupleDescriptor cached with the routine may be returned.

      When the routine is a function declared with a non-composite return type (or with a single OUT parameter, a case PostgreSQL treats the same way), this method returns a synthetic ephemeral TupleDescriptor with one unnamed attribute of that type.

      Throws:
      SQLException
    • inputsAreSpread

      boolean inputsAreSpread()
      Returns true if a routine with a variadic parameter declared with the wildcard "any" type is being called with its arguments in "spread" form at this call site.

      In "spread" form, arguments().size() can exceed the routine's declared number of parameters, with the values and types of the variadic arguments to be found at successive positions of RegProcedure.Call.arguments(). In "collected" form, the position of the variadic parameter is passed a single PostgreSQL array of the variadic arguments' type. A call with zero arguments for the variadic parameter can only be made in "collected" form, with an empty array at the variadic parameter's declared position; therefore, no case arises where the passed arguments are fewer than the declared parameters.

      When the routine declaration has a variadic parameter of any type other than the wildcard "any", collected form is always used. In the wildcard case, collected or spread form may be seen, at the caller's option. Therefore, there is an ambiguity when such a routine receives a single argument of array type at the variadic position, and this method must be used in that case to determine the caller's intent.

      Returns:
      always false, except for a routine declared VARIADIC "any" when its arguments are being passed in "spread" form.
    • stableInputs

      BitSet stableInputs(BitSet ofInterest)
      For the arguments at (zero-based) positions in arguments() indicated by ofInterest, report (in the returned bit set) which of those are 'stable', that is, will keep their values across calls associated with the current Lookup.