Advance the result set cursor to the next row. Returns 0 if the cursor is at the end of the
result set.. An optional argument contains a %Library.Status value on return. This %Status value
indicates success or failure of the %Next call. %SQLCODE is also set by %Next.
Inherited description: This callback method is invoked by the %New() method to
provide notification that a new instance of an object is being created.
If this method returns an error then the object will not be created.
It is passed the arguments provided in the %New call.
When customizing this method, override the arguments with whatever variables and types you expect to receive from %New().
For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:
Method %OnNew(dob as %Date = "", name as %Name = "") as %Status
If instead of returning a %Status code this returns an oref and this oref is a subclass of the current
class then this oref will be the one returned to the caller of %New method.
Creates an object of the class containing the functionality needed to access an external source. For now,
these will be Java objects (to read CSV/external DBs through JDBC).
1) Create request string, which is used by the external code to connect to the relevant external
source.
2) Instantiate the object, store it in ReaderObject property
Called by %SQL.FDW.Common:Execute()
method Execute(Parameters As %List = "") as %Status
Execute the query. For Java FDWs, this blends with the Prepare()
Build and return request string used by Reader code for connecting to a database.
For a file, Server host = abs. path to directory, Table = filename+extension, port & user & pass are all N/A
Inherited description: Every foreign data wrapper should build it's own version of this method to return metadata about the columns
that will be provided by the foreign data wrapper. Each one should return metadata as specified below. This metadata
should be made available as requested after the Prepare() stage of the foreign data wrapper. If desired, a foreign data wrapper can
wait until this method is called to retrieve and then build the corresponding metadata structure.
see also %SQL.StatementMetadata:%GenerateMetadata()
metadata = $lb()
1 - # of SELECT columns
2 - i:
1) Name
2) ODBC Type
3) Precision
4) Scale
5) NULLABLE (integer)
6) Column Label (same as Name)
7) Column Table Name
8) Column Schema Name
9) Column Qualifier Name - NULL
10) $Char(1)/$Char(0) string / $Extract position:
1) isAutoIncrement
2) isCaseSensitive
3) isCurrency
4) IsReadOnly
5) IsRowVersion
6) IsUnique
7) IsAliased
8) IsExpression
9) IsHidden
10) IsIdentity
11) IsKeyColumn
12) IsRowid
13) IsList
Inherited description: Reset the result set back to the first row. Note this may entail a full re-execution depending on the specific
implmentation of the foreign data wrapper.