Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%Library] >  [DynamicGWQuery]
Private  Storage   

class %Library.DynamicGWQuery extends %Query

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5


Summary

Methods
Close Execute Fetch FetchRows Func
GetInfo GetODBCInfo Prepare SendODBC


Methods

• classmethod Close(qHandle As %Binary) as %Status
Close the query. qHandle is user-defined data.
• classmethod Execute(ByRef qHandle As %Binary) as %Status
Executes the query; This method is called with the query input parameters. qHandle is user-defined data used to communicate amongst the various Query methods.
• 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(0,columnNumber). %Library.ResultSet recognizes this form and will extract the column value as the subscripted value.

• 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
Returns information about the query. It is used by the various ResultSet objects.
• classmethod Prepare(ByRef qHandle As %Binary, sqltext As %String, containid As %Integer = 0, connection As %String) as %Status
Prepare the query for execution. For static queries, this method probably just returns $$$OK. For dynamic queries this method will set up the information returned by GetInfo. It is used by the various ResultSet objects.


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.