Namespace: db

$. db

Namespace for HANA database access

Classes

CallableStatement
Connection
ParameterMetaData
PreparedStatement
ResultSet
ResultSetMetaData
SQLException

Members

<static> isolation

Constants that represent the isolation levels for a transaction
Properties:
Name Type Default
READ_COMMITTED number 2
REPEATABLE_READ number 4
SERIALIZABLE number 8

<static> types

Set of constants of the database column types
Properties:
Name Type Default
TINYINT number 1
SMALLINT number 2
INT number 3
INTEGER number 3
BIGINT number 4
DECIMAL number 5
REAL number 6
DOUBLE number 7
CHAR number 8
VARCHAR number 9
NCHAR number 10
NVARCHAR number 11
BINARY number 12
VARBINARY number 13
DATE number 14
TIME number 15
TIMESTAMP number 16
CLOB number 25
NCLOB number 26
BLOB number 27
TABLE number 45
SMALLDECIMAL number 47
TEXT number 51
SHORTTEXT number 52
ALPHANUM number 55
SECONDDATE number 62

Methods

<static> getConnection(sqlcc, isolationLevel) → {$.db.Connection}

Returns a connection to the database
Parameters:
Name Type Argument Default Description
sqlcc string <optional>
Specifies XS SQL Connection Configuration file(*.xssqlcc) used to create the connection.
isolationLevel number <optional>
$.db.isolation.READ_COMMITTED Specifies the transaction isolation level, for example, $.db.isolation.READ_COMMITTED, $.db.isolation.REPEATABLE_READ, or $.db.isolation.SERIALIZABLE. Default is $.db.isolation.READ_COMMITTED.
Deprecated:
  • This version of getConnection is deprecated. Please use the one with the object parameter.
    Returns:
    Connection - The internal connection to the database with the user of the current session.
    Type
    $.db.Connection

    <static> getConnection(configurationObject) → {$.db.Connection}

    Returns a connection to the database
    Parameters:
    Name Type Argument Description
    configurationObject $.db~configurationObject <optional>
    object Object may specify the following optional parameters: isolation level, sqlcc and locale to configure the connection.
    Returns:
    Connection - The internal connection to the database with the user of the current session.
    Type
    $.db.Connection

    Type Definitions

    configurationObject

    Type:
    • object
    Properties:
    Name Type Argument Default Description
    sqlcc string <optional>
    Specifies XS SQL Connection Configuration file (*.xssqlcc) used to create the connection.
    isolationLevel number <optional>
    $.db.isolation.READ_COMMITTED Specifies the transaction isolation level, for example, $.db.isolation.READ_COMMITTED, $.db.isolation.REPEATABLE_READ, or $.db.isolation.SERIALIZABLE. Default is $.db.isolation.READ_COMMITTED.
    locale string <optional>
    Locale to configure the connection in IETF (BCP 47) format. Configuring the connection with a locale enables coherent behavior of request-based and background processing (e.g., when XS Jobs and HTTP Requests trigger the execution of the same script).