Connection

"intersystems-iris". Connection

A connection to an IRIS instance. Create one by calling the createConnection. The host, port, namespace, timeout and logfile from the last successfull connection attempt are saved as readonly properties of the connection object.

Properties
Name Type Description
host string

the host we are connected to

port number

the port we are connected to

namespace string

the namespace we are connected to

sharedmemory boolean

true if shared memory is used for communication. This value should be equal to the return value of isUsingSharedMemory. By default it is set to true.

logfile string

the path of the file used for the communication logging if logging is enabled.If it starts with "+" any existing file with the same name gets truncated. If it starts with "-" the logging is skipped. Default value is "-".

protocolVersion number

the version of the protocol used for the communication

compactDouble boolean

true if the server can interpret compressed double values

serverLocale string

the locale of the server we are connected to. The value depends on the supported by the IRIS server locales and follow the Node.js locale name convensions described in the util.TextDecoder class.

timeout number

the timeout of the connection (seconds), used during connection establishment. By default timeout is set to 10.

Methods

# close()

Closes the connection to the IRIS instance, if open.

# createIris() → {module:"intersystems-iris".Iris}

Creates an instance of the Iris class.

Tutorials:
Throws:

If connection if closed (No Iris on closed connection)

Returns:

An instance of
Iris.

Type
module:"intersystems-iris".Iris

# isClosed() → {boolean}

Checks whether the connection is closed.

Returns:

true if connection is closed, false otherwise

Type
boolean

# isUsingSharedMemory() → {boolean}

Checks whether the connection is open and is using shared memory.

Returns:

true if the connection has an open shared memory connection, false otherwise.

Type
boolean

# toString() → {string}

Returns a string representation of the connection.

Returns:

the string representation of the connection or "Not connected yet" if a connection has not been established

Type
string