%SQL.DICT.QueryTypeCustom
hidden class %SQL.DICT.QueryTypeCustom extends %Library.Query
This query type class can only be used in a subclass of %SQL.CustomQuery. It is implemented as a table-valued function, not as a traditional query that is prepared and accessed through a result set instance. The proper way to invoke this query is to execute an SQL CALL statement, either as an embedded SQL statement, through xDBC, or as a dynamic SQL statement.Method Inventory
Parameters
Methods
qHandle is query-defined data and is typically updated by Fetch.
The Fetch method should set Row to be a $List of values corresponding to the columns of the query. If we are past the end of the data and no row is returned, Row should be set to null string (""). If the non-empty row being returned is the last one, AtEnd could be optionally set to 1, indicating that an additional call to Fetch may be avoided.
Row may also be subscripted. If any of the columns in the row are stream orefs then the oref type information is lost in the Row $list encoded value. To retain the oref type, place the oref into Row(0,columnNumber). %Library.ResultSet recognizes this form and will extract the column value as the subscripted value.
Returns information about columns in the query result, parameters in the query formal list, and whether or not the result contains enough information to form an ID value.
This information is return in three pass-by-reference parmeters:
- colinfo - contains one list element for each column declared in ROWSPEC. The form is name:exttype:caption
- parminfo - contains one list element for each formal paramter of the query in the form name:exttype
- idinfo - contains a list, the first element indicating the position of the ID, zero if not included and the second element is the extent of these ID value.
- qHandle -
query handle, used for dynamic queries