Class Reference
IRIS for UNIX 2024.1.2
|
|
Private
Storage
|
For information on this class, see Defining and Using Class Queries.
The %SQLQuery class is used for defining class queries based on SQL definitions.
|
|
Methods | ||||
---|---|---|---|---|
Close | Execute | Fetch | FetchRows | Func |
GetInfo | GetODBCInfo | Prepare | SendODBC |
Subclasses | ||
---|---|---|
%Library.ExtentSQLQuery | %Library.RowSQLQuery |
|
COMPILEMODE parameter deprecated. No longer used.
The SELECTMODE parameter allows the query author to declare the format of the values returned by the query. It is the responsibility of the query implementation to properly format the values according to the SELECTMODE value. If SELECTMODE is RUNTIME then the query implementation has to examine the current runtime setting and react accordingly. The current runtime SELECTMODE value can be retrieved by calling $system.SQL.GetSelectMode(). The default value of SELECTMODE is LOGICAL to preserve compatibility with older implementations. REMEMBER - it is only a declaration and the implementation of the query is responsible for properly formatting the column values in a manner consistent with the SELECTMODE setting.
|
Close the query associated with the handle
Execute is passed parameters for Query Returns handle for subsequent operations
Fetch the next row of data from the query.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(columnNumber). %Library.ResultSet recognizes this form and will extract the column value as the subscripted value.
FetchRows returns the next FetchCount rows in the query Updates handle for subsequent operations Returns $list for row or "" if no more rows
Func is a method that is used to invoke the query as a function, returning an instance of %SQL.StatementResult.
Returns information about the query. It is used by the various ResultSet objects.
Fetch and send a series of rows for the ODBC/JDBC server. For internal use only.