这些API虽然在IRIS 2020.1中已经实现了,但没有被放在官方文档里。
这都是直接从Class Reference中提取的,我只是收集了它来创建第一个概述。
ObjectScript的本地API遵循其他语言平台上使用的API。它从一个静态API开始,允许用户使用Iris Connection连接到IRIS命名空间,无论是本地还是远程。连接接口允许用户实例化IRIS本地API类(%Net.DB.Iris)。然后,该实例可用于访问IRIS全局数组,管理事务,调用例程或类中实现的函数和方法,以及实例化远程迭代器。
%Net.DB.DataSource
该类实现了IRIS Native API for Object Script DataSource接口。
目前,该接口仅包含 CreateConnection 方法
CreateConnection 方法接受 url, port, namespace, user, 和 pwd 等参数. 这些参数的信息请参考 %Net.DB.Connection 。CreateConnection() 返回 %Net.DB.Connection的实例
host | input | The host name or address, defaults to 127.0.0.1 |
port | input | The port on which to connect |
namespace | input | The namespace to connect to |
user |
input | The user's name |
pwd | input | User's password |
timeout | input | The number of seconds to wait for the connection to be established. Optional. |
logfile | input | The name of the file to be used for logging. If specified, connection activity will be logged to that file. Optional. |
return | An oref referencing an instance of %Net.DB.Connection |
%Net.DB.Connection
这个类实现了IRIS 原生API的ObjectScript 连接接口。
这个类不应该直接被实例化,只能通过 %Net.DB.DataSource 来使用 CreateMethod() 函数.
这个类的公开接口只包括以下确定的项目,所有其他成员都是内部的。
Host | property | 建立连接的主机The host specified when establishing the connection |
Port | property | 连接的端口The port that this connection is connected. |
Namespace | property | 连接的命名空间The namespace that this connection is connected. |
Timeout | property | 暂停时间The timeout value specified establishing the connection |
IsClosed | method | 如果连接关闭返回真Returns true if this connection instance is no longer connected. |
Close | method | 关闭连接Close this connection. |
CreateIris | method | 返回 %Net.DB.Iris实例 |
%Net.DB.Iris
这个类实现了主要的功能集IRIS 原生 API Object Script API的功能集 。
IRIS 原生 API中唯一没有被这个类实现的其他成员是由%Net.DB.DataSource and %Net.DB.Connection.实现的
这个类不应该被直接实例化。
实例化这个类的正确方法是使用%Net.DB.Connection的实例调用CreateIris()方法。
方法总结: