Skip to main content

%XDBC.Gateway.Connection

FOR INTERNAL USE - do not invoke directly

Method Inventory

Methods

classmethod %GetConnection(connectionInfo As %RawString, Output status As %Status) as Connection
Get a connection to an external DBMS.

Parameters

NameTypeDescription
connectionInfo input

Information about the type of external connection. This can be one of the following:

  • A dynamic object containing some set of fields that are specific to the type of connection requested.

    type is expected to be "jdbc" or "odbc".

    For "type": "jdbc", the fields include host, port, url, driver, datasource, classpath, user, and password:
    {
      "host": "localhost",
      "port": 1972,
      "databasename": "USER",
      "datasource": "com.intersystems.jdbc.IRISDataSource",
      "user": "someuser",
      "password": "password",
      "type": "jdbc"
    }
    

    For "type": "odbc", the fields include dsn, user, password:

    {
      "dsn": "IRIS User",
      "user": "someuser",
      "password": "password",
      "type": "odbc"
    }
    

  • A JSON formatted string containg a single object with fields as defined above.
  • The name of a previously defined instance of %Library.SQLConnection.

status output

A %Status value indicating success or failure.

return value

An instance of %XDBC.Gateway.Connection

abstract method Close()
Releases this Connection object's database and resources immediately instead of waiting for them to be automatically released
abstract method Commit()
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object
abstract method CreateStatement() as Statement
Creates a Statement object for sending SQL statements to the database
abstract method GetAutoCommit() as %Boolean
Retrieves the current auto-commit mode for this Connection object
classmethod GetConnection(connectionInfo As %Library.RawString) as Connection
Get a gateway connection.
abstract method GetMetaData() as DatabaseMetaData
Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection
abstract method GetSchema() as %String
Retrieves this Connection object's current schema name
abstract method GetTransactionIsolation() as %Integer
Retrieves this Connection object's current transaction isolation level
abstract method IsClosed() as %Boolean
Retrieves whether this Connection object has been closed
abstract method IsReadOnly() as %Boolean
Retrieves whether this Connection object is in read-only mode
abstract method IsValid(timeout As %Integer) as %Boolean
Returns true if the connection has not been closed and is still valid
abstract method PrepareCall(sql As %String) as Statement
Creates a Statement object for calling stored procedures
abstract method PrepareStatement(sql As %String) as Statement
Creates a statement object for sending parameterized SQL statements to the database
abstract method Rollback()
Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object
abstract method SetAutoCommit(autoCommit As %Boolean)
Sets this connection's auto-commit mode to the given state
abstract method SetReadOnly(readOnly As %Boolean)
Puts this connection in read-only mode as a hint to the driver to enable database optimizations
abstract method SetSchema(schema As %String)
Sets the given schema name to access
abstract method SetTransactionIsolation(level As %Integer)
Attempts to change the transaction isolation level for this Connection object to the one given

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab