Module : sql

Module overview

This module provides the common record types and constants required for other data management modules such as jdbc, mysql, and h2.

PoolOptions

The PoolOptions type is the properties that are used to configure DB connection pool. This is used with jdbc, mysql, and h2 clients to configure the connection pool associated with the client.

SQLType

The SQLType represents the SQL data type of a given parameter. When using a parameter, use the same SQL type as the actual database table column type. Otherwise data loss can occur.

Direction

The Direction type represents the direction of the parameter used in call operation. IN parameters are used to send values to stored procedures or pass parameters to other operations such as select, update, etc. This is the default direction of a parameter. The OUT parameters are used to get values from stored procedures. The INOUT parameters are used to send values to stored procedures and retrieve values from stored procedures.

Parameter

The Parameter type represents a parameter for the SQL operations when a variable needs to be passed into the sql statement given in the operation.

UpdateResult

The UpdateResult type represents the output of the update remote function. It contains the updated row count and auto generated column values.

Records

ApplicationErrorData Represents the properties which are related to Non SQL errors
DatabaseErrorData Represents the properties which are related to SQL database errors
Parameter Parameter represents a parameter for the SQL remote functions when a variable parameter needs to be passed to the remote function.
PoolOptions Represents the properties which are used to configure DB connection pool. Default values of the fields can be set through the configuration API.
UpdateResult Result represents the output of the `update` remote function.

Objects

GlobalPoolConfigContainer

Clients

AbstractSQLClient

The abstract SQL Client object for SQL databases.

Client

Represents the base SQL Client

Functions

close

An internal function used by clients to shutdown the connection pool.

getGlobalPoolConfigContainer

Retrieves the final GlobalPoolConfigContainer object.

Constants

TYPE_VARCHAR
TYPE_CHAR
TYPE_LONGVARCHAR
TYPE_NCHAR
TYPE_LONGNVARCHAR
TYPE_NVARCHAR
TYPE_BIT
TYPE_BOOLEAN
TYPE_TINYINT
TYPE_SMALLINT
TYPE_INTEGER
TYPE_BIGINT
TYPE_NUMERIC
TYPE_DECIMAL
TYPE_REAL
TYPE_FLOAT
TYPE_DOUBLE
TYPE_BINARY
TYPE_BLOB
TYPE_LONGVARBINARY
TYPE_VARBINARY
TYPE_CLOB
TYPE_NCLOB
TYPE_DATE
TYPE_TIME
TYPE_DATETIME
TYPE_TIMESTAMP
TYPE_ARRAY
TYPE_STRUCT
TYPE_REFCURSOR
DIRECTION_IN
DIRECTION_OUT
DIRECTION_INOUT
DATABASE_ERROR_REASON
APPLICATION_ERROR_REASON

Types

Direction

The direction of the parameter.

IN - IN parameters are used to send values to stored procedures OUT - OUT parameters are used to get values from stored procedures INOUT - INOUT parameters are used to send values and get values from stored procedures

JdbcClientError

Represents a database or application level error returned from JDBC client remote functions.

SQLType

The SQL Datatype of the parameter.

VARCHAR - Small, variable length character string CHAR - Small, fixed length character string LONGVARCHAR - Large, variable length character string NCHAR - Small, fixed length character string with unicode support LONGNVARCHAR - Large, variable length character string with unicode support

BIT - Single bit value that can be zero or one, or nil BOOLEAN - Boolean value either True or false TINYINT - 8-bit integer value which may be unsigned or signed SMALLINT - 16-bit signed integer value which may be unsigned or signed INTEGER - 32-bit signed integer value which may be unsigned or signed BIGINT - 64-bit signed integer value which may be unsigned or signed

NUMERIC - Fixed-precision and scaled decimal values DECIMAL - Fixed-precision and scaled decimal values REAL - Single precision floating point number FLOAT - Double precision floating point number DOUBLE - Double precision floating point number

BINARY - Small, fixed-length binary value BLOB - Binary Large Object LONGVARBINARY - Large, variable length binary value VARBINARY - Small, variable length binary value

CLOB - Character Large Object. NCLOB - Character large objects in multibyte national character set

DATE - Date consisting of day, month, and year TIME - Time consisting of hours, minutes, and seconds DATETIME - Both DATE and TIME with additional a nanosecond field TIMESTAMP - Both DATE and TIME with additional a nanosecond field

ARRAY - Composite data value that consists of zero or more elements of a specified data type STRUCT - User defined structured type, consists of one or more attributes REFCURSOR - Cursor value

Errors

ApplicationError

Represents the error which is related to Non SQL errors

DatabaseError

Represents an error caused by an issue related to database accessibility, erroneous queries, constraint violations, database resource clean-up and other similar scenarios.