Skip to main content


class %Library.ExtentSQLQuery extends %Library.SQLQuery

This class is used to implement the system-provided "Extent" query that every persistent class contains. This class is not for application use.

Method Inventory


classmethod Close(%qHandle As %Binary) as %Status
Close the query associated with the handle. This is also an opportunity to clean up.
classmethod Execute(ByRef %qHandle As %Binary) 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
Inherited description: 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.

classmethod FetchRows(ByRef %qHandle As %Binary, FetchCount As %Integer = 0, ByRef RowSet As %List, ByRef ReturnCount As %Integer, ByRef AtEnd As %Integer) as %Status
FetchRows returns the next FetchCount rows in the query Updates handle for subsequent operations Returns $list for row or "" if no more rows
classmethod Func() as %SQL.StatementResult
Func is a method that is used to invoke the query as a function, returning an instance of %SQL.StatementResult.
classmethod GetInfo(ByRef colinfo As %List, ByRef parminfo As %List, ByRef idinfo As %List, ByRef %qHandle As %Binary, extoption As %Integer = 0, extinfo As %List) as %Status
GetInfo() 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 - Integer indicating the posistion of the ID value, zero if not included. The information is not constructed until the first invocation of GetInfo(). Once the information is compiled the first time, it is stored in the ^oddMAC global and is retrieved on subsequent calls to GetInfo()
classmethod GetODBCInfo(ByRef colinfo As %List, ByRef parminfo As %List, ByRef qHandle As %Binary)

Inherited Members

Inherited Methods

FeedbackOpens in a new tab