Public Member Functions | |
_.Library.Status | Close () |
Closes the current result set cursor. | |
_.Library.Integer | ContainsId () |
If the current query contains an object Id (based on the CONTAINSID parameter. More... | |
_.Library.Status | Execute (args) |
Executes the current query. More... | |
_.Library.String | Get (_.Library.String name) |
Returns the value of the column with the name name in the current row of the result set. More... | |
_.Library.Integer | GetColumnCount () |
Returns the number of columns in the result set. | |
_.Library.String | GetColumnHeader (_.Library.Integer n) |
Returns the column header for column n in the result set. | |
_.Library.String | GetColumnName (_.Library.Integer n) |
Returns the name of column n in the result set. | |
_.Library.String | GetData (_.Library.Integer n) |
Returns the value of column n in the current row of the result set. | |
_.Library.String | GetDataByName (_.Library.String name) |
Returns the value of the column with the name name in the current row of the result set. More... | |
_.Library.String | GetExtent () |
The name of the extent that this query will return Id values from (based on the EXTENT parameter. More... | |
_.Library.RegisteredObject | GetObject () |
If this query returns the object Id then return the oref you get from. More... | |
_.Library.Integer | GetParamCount () |
Returns the number of input parameters for the current query. | |
_.Library.String | GetParamName (_.Library.Integer n) |
Returns the name of input parameter n for the current query. | |
_.Library.Integer | Next (_.Library.Status sc) |
Advance the result set cursor to the next row. More... | |
_.Library.Status | Prepare (args) |
Use this method with dynamic queries to provide the query to be. More... | |
_.Library.Integer | QueryIsValid () |
Returns true (1) if the ClassName and QueryName properties of this. More... | |
![]() | |
_.Library.Status | CloseCursor () |
This method is expected to be overridden by concrete subclasses. | |
_.Library.Status | OnClose () |
This callback method is invoked by the <METHOD>Close</METHOD> method to. More... | |
![]() | |
_.Library.Status | OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount) |
This callback method is invoked when the current object is added to the SaveSet,. More... | |
_.Library.Status | OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned) |
This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More... | |
_.Library.Status | OnNew () |
This callback method is invoked by the <METHOD>New</METHOD> method to. More... | |
_.Library.Status | OnValidateObject () |
This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More... | |
Static Public Member Functions | |
RunQuery (_.Library.String ClassName, _.Library.String QueryName, args) | |
This is a diagnostic function; it runs the specified query and prints the output to the console. | |
Public Attributes | |
Data | |
Used to store the data returned from the resultset by column name. More... | |
RuntimeMode | |
Use this method to set the SQL runtime mode for the query to be. More... | |
Private Member Functions | |
_.Library.Status | Execute (args) |
alias for new result set interface More... | |
_.Library.String | Get (_.Library.String name) |
Returns the value of the column with the name name in the current row of the result set. More... | |
_.Library.String | GetData (_.Library.Integer n) |
Returns the value of column colnbr in the current row of the result set. | |
_.Library.Integer | Next (_.Library.Status sc) |
Advance the result set cursor to the next row. More... | |
Additional Inherited Members | |
![]() | |
CAPTION = None | |
Optional name used by the Form Wizard for a class when generating forms. More... | |
JAVATYPE = None | |
The Java type to be used when exported. | |
PROPERTYVALIDATION = None | |
This parameter controls the default validation behavior for the object. More... | |
Abstract version of the resultset which specific implementations of result sets inherit from.
A result set is a type of result returned by executing either a SELECT statement or a CALL statement. Please refer to <class>SQL.Statement</class> and <class>SQL.StatementResult</class> for more information on how to prepare dynamic SQL statements and how to process the results the of executing them.
|
private |
alias for new result set interface
Abstract version of the resultset which specific implementations of result sets inherit from.
A result set is a type of result returned by executing either a SELECT statement or a CALL statement. Please refer to <class>SQL.Statement</class> and <class>SQL.StatementResult</class> for more information on how to prepare dynamic SQL statements and how to process the results the of executing them.
|
private |
Returns the value of the column with the name name in the current row of the result set.
If name is not a valid column name, this method returns an empty string.
Reimplemented from IResultSet.
|
private |
Advance the result set cursor to the next row.
Returns 0 if the cursor is at the end of the
result set.
Reimplemented from IResultSet.
Reimplemented in ScrollableResultSet, ResultSet, and ResultSet.
_.Library.Integer ContainsId | ( | ) |
If the current query contains an object Id (based on the CONTAINSID parameter.
being set), return the column position of the object Id.
Otherwise return 0.
Reimplemented in ResultSet.
_.Library.Status Execute | ( | args | ) |
_.Library.String Get | ( | _.Library.String | name | ) |
Returns the value of the column with the name name in the current row of the result set.
If name is not a valid column name, this method returns an empty string. Look at updating the code to use the <property>Data</property> multidimensional property to access the fields faster than using this method call.
Reimplemented from IResultSet.
_.Library.String GetDataByName | ( | _.Library.String | name | ) |
Returns the value of the column with the name name in the current row of the result set.
If name is not a valid column name, this method returns an empty string.
Note: this method has been superceded by the equivalent <method>Get</method> method.
Reimplemented in ResultSet.
_.Library.String GetExtent | ( | ) |
The name of the extent that this query will return Id values from (based on the EXTENT parameter.
being set). Only returns a value if the query contains Id values.
Reimplemented in ResultSet.
_.Library.RegisteredObject GetObject | ( | ) |
If this query returns the object Id then return the oref you get from.
opening an object with this id.
Reimplemented in DataSet, ScrollableResultSet, and ResultSet.
_.Library.Integer Next | ( | _.Library.Status | sc | ) |
Advance the result set cursor to the next row.
Returns 0 if the cursor is at the end of the
result set.
Reimplemented from IResultSet.
Reimplemented in ScrollableResultSet, ResultSet, and ResultSet.
_.Library.Status Prepare | ( | args | ) |
Use this method with dynamic queries to provide the query to be.
executed. In the case of the <nobr>DynamicQuery:SQL</nobr> query, p1 is a string containing an SQL query. The query may contain parameters represented by ? characters within the query. The values of any parameters are supplied via the <method>Execute</method> method. For example:
Set result=##class(ResultSet).New("%DynamicQuery:SQL")
Do result.Prepare("SELECT Name,City FROM Person WHERE Name %STARTSWITH ? AND City = ?")
Do result.Execute("A","Boston") While result.Next() { Write result.Data("Name"),result.Data("City"),! }
Reimplemented in ResultSet.
_.Library.Integer QueryIsValid | ( | ) |
Returns true (1) if the ClassName and QueryName properties of this.
<nobr>ResultSet</nobr> object refer to a valid class query. Otherwise it returns false (0).
Reimplemented in ResultSet.
Data |
Used to store the data returned from the resultset by column name.
This can
be accessed directly for more performance than the <method>Get</method> and <method>GetDataByName</method> as it avoids a method call. For example code that said:
While result.Next() { Write result.Get("Name"),result.Get("Salary"),! }
; Becomes this faster code
While result.Next() { Write $get(result.Data("Name")),$get(result.Data("Salary")),! }
Note that as this 'Data' property is multidimensional if there is no such column name as 'Salary' you will get an UNDEFINED error without the $get around it. If there are two columns with the same name in the result set then the second one will be the one referenced by the 'Data' property. If you need to refer to both of them use the <method>GetData</method> and give the position of the column you want.
RuntimeMode |