Skip to main content

%Net.DB.DataSource

abstract class %Net.DB.DataSource

This class implements the IRIS Native API for Object Script DataSource interface. At this time that interface consists solely of the CreateConnection() method.

IRIS Native API for ObjectScript

The Native API for ObjectScript follows the API used on other language platforms. It starts with a static API that allows the user to connect to an IRIS Namespace, either local or remote, using an Iris Connection. The connection interface allows the user to then instantiate the IRIS Native API class (%Net.DB.Iris). That instance can then be used to access IRIS Global Arrays, manage transactions, invoke functions and methods implemented in routines or classes, and instantiate remote iterators.

Method Inventory

Methods

classmethod CreateConnection(host As %String(MAXLEN="")="127.0.0.1", port As %Integer = 51773, namespace As %String(MAXLEN="")="USER", user, pwd, timeout As %Integer, logfile As %String(MAXLEN=255)="") as %Net.DB.Connection
CreateConnection accepts url, port,namespace, user, and pwd parameters. Refer to %Net.DB.Connection for more information on these parameters. CreateConnection() returns an instance of %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

FeedbackOpens in a new tab