Class Reference
%Library.ForeignTableQuery
Server:appadmin-00044-deployment-6bf4cbc86d-f76z9
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [%Library] >  [ForeignTableQuery]
Private  Storage

class %Library.ForeignTableQuery extends %Query

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
4


Summary

Methods
Close Execute Fetch FetchRows Func
GetInfo GetODBCInfo Prepare SendODBC


Methods

• classmethod Close(%qHandle As %Binary) as %Status
Close the connection assoicated with the foreign data wrapper object %qHandle
• classmethod Execute(ByRef %qHandle As %Binary, query As %String = "", parameters As %List = "") as %Status

Execute takes optional whereClause and parameters parameters for predicate pushdown. This method creates an object of the relevant foreign data wrapper class (%SQL.FDW.*) and returns it by reference in %qHandle.

• 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 external source.

qHandle is a foreign data wrapper object.

The Fetch method sets Row to be a $List of values corresponding to the columns of the query by passing the row by reference to the Fetch method of the foreign data wrapper. 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 is set to 1, indicating that an additional call to Fetch may be avoided.

• 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.


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