Row Block (a_v4_extfn_row_block)

Use the a_v4_extfn_row_block structure to represent the data in a block of rows.

Implementation

/* a_v4_extfn_row_block - */
typedef struct a_v4_extfn_row_block {
    a_sql_uint32		max_rows;
    a_sql_uint32		num_rows;
    a_v4_extfn_row  *row_data;
} a_v4_extfn_row_block;

Data Members and Data Types Summary

Data Member Data Type Description
max_rows a_sql_uint32 The maximum number of rows this row block can handle
num_rows a_sql_uint32 Must be less than or equal to the maximum of rows the row block contains
row_data a_v4_extfn_row * The row data vector

Description

The row block structure is utilized by the fetch_into and fetch_block methods to allow the production and consumption of data. The allocator sets the maximum number of rows. The producer icorrectly sets the number of rows. The data consumer should not attempt to read more than number of rows produced.

The owner of the row_block structure determines the value of max_rows data member. For example, when a table UDF is implementing fetch_into, the value of max_rows is determined by the server as the number of rows that can fit into 128K of memory. However, when a table UDF is implementing fetch_block, the table UDF itself determines the value of max_rows.

Restrictions and Limitations

The value for the both the num_rows and max_rows is > 0. The num_rows must be <= max_rows. The row_data field should not be NULL for a valid row block.