Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / %SYS namespace / %Library.RowSQLQuery
Private  Storage   

%Library.RowSQLQuery


class %Library.RowSQLQuery extends
%SQLQuery

This class is used to implement the 'complete row' SQL query that can be used to return the entire persistent state of an object. This class is not for application use.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3


Summary


Methods
Close Execute Fetch FetchRows Func
GetInfo GetODBCInfo Prepare SendODBC


Methods


• classmethod Close(%qHandle As %Binary) as %Status
Close the query associated with the handle
• classmethod Execute(ByRef %qHandle As %Binary, id As %String) as %Status
Execute is passed parameters for Query Returns handle for subsequent operations
• classmethod Fetch(ByRef %qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
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.