Prepare
Client
Int32—p_operation-
Operation code (
op_prepare_statement—68) Int32—p_sqlst_transaction-
Transaction handle
Int32—p_sqlst_statement-
Statement handle
Int32—p_sqlst_SQL_dialect-
SQL dialect (
1or3)This should generally match the connection dialect.
String—p_sqlst_SQL_str-
Statement to be prepared
Buffer—p_sqlst_items-
Statement information items, including describe and describe bind
Example of requested information items-
isc_info_sql_select -
isc_info_sql_describe_vars -
isc_info_sql_sqlda_seq -
isc_info_sql_type -
isc_info_sql_sub_type -
isc_info_sql_length -
isc_info_sql_scale -
isc_info_sql_field -
isc_info_sql_relation
-
Int32—p_sqlst_buffer_length-
Target buffer length for information response
See also the description of
p_info_buffer_lengthin [wireprotocol-requests-info].
Server
[wireprotocol-responses-generic] — on success, p_resp_data holds the statement description (matching the requested information items)
For statements with a lot of columns and/or parameters, it may be necessary to handle truncation of the buffer by repeating the describe and/or describe bind information request using [wireprotocol-statements-information] and using isc_info_sql_sqlda_start to inform the server from which column or parameter to continue.
For an example, see Jaybird’s StatementInfoProcessor.handleTruncatedInfo(…).