EXTFNAPIV4_DESCRIBE_PARM_TABLE_HAS_REWIND Attribute (Set)

The EXTFNAPIV4_DESCRIBE_PARM_TABLE_HAS_REWIND attribute indicates if the parameter supports rewind. Used in a describe_parameter_set scenario.

Data Type

a_sql_byte

Description

Indicates whether a producer can support rewind. Valid only for table arguments.

You must also provide an implementation of the rewind table callback (_rewind_extfn() ), if you plan on setting DESCRIBE_PARM_TABLE_HAS_REWIND to true. The server cannot execute the UDF if you do not provide the callback method.

Usage

A UDF sets this property during the Optimization state if it can provide rewind capability for its result table at no cost. If it is expensive for the UDF to provide rewind, do not set this property, or set it to 0. If set to 0, the server provides rewind support.

Returns

On success, returns sizeof(a_sql_byte).

On failure, returns one of the generic describe_parameter errors, or:
  • EXTFNAPIV4_DESCRIBE_BUFFER_SIZE_MISMATCH – set error returned if the describe_buffer is not the size of a_sql_byte.
  • EXTFNAPIV4_DESCRIBE_INVALID_STATE – set error returned if the state is not equal to Optimization.
  • EXTFNAPIV4_DESCRIBE_NON_TABLE_PARAMETER – set error returned if the UDF attempts to set this attribute on a parameter that is not a table.
  • EXTFNAPIV4_DESCRIBE_INVALID_PARAMETER – set error returned if the specified argument is not the result table.
  • EXTFNAPIV4_DESCRIBE_INVALID_ATTRIBUTE_VALUE – set error returned if the UDF attempts to set this attribute to a value other than 0 or 1.

Query Processing States

Valid in:
  • Optimization state