public class SQLDatasourceUtils extends Object
Constructor and Description |
---|
SQLDatasourceUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanupConnection(ResultSet rs,
Statement stmt,
Connection conn,
boolean isInTransaction)
This will close Database connection, statement and the resultset.
|
static TypeKind |
getColumnType(int sqlType)
This method will return equal ballerina data type for SQL type.
|
static String |
getString(Array dataArray)
This will retrieve the string value for the given array data.
|
static String |
getString(Blob data)
This will retrieve the string value for the given blob.
|
static String |
getString(byte[] data)
This will retrieve the string value for the given binary data.
|
static String |
getString(Clob data)
This will retrieve the string value for the given clob.
|
static String |
getString(Date value)
This will retrieve the string value for the given date value.
|
static String |
getString(Struct udt)
This will retrieve the string value for the given struct data.
|
static String |
getString(Time value)
This will retrieve the string value for the given time data.
|
static String |
getString(Timestamp value)
This will retrieve the string value for the given timestamp value.
|
static void |
setArrayValue(Connection conn,
PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setBigIntValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setBinaryValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setBlobValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setBooleanValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setClobValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setDateValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setDoubleValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setIntValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setNClobValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setNStringValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setNullObject(PreparedStatement stmt,
int index) |
static void |
setNumericValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setRealValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setStringValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setTimeStampValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType,
Calendar utcCalendar) |
static void |
setTimeValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType,
Calendar utcCalendar) |
static void |
setTinyIntValue(PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
static void |
setUserDefinedValue(Connection conn,
PreparedStatement stmt,
BValue value,
int index,
int direction,
int sqlType) |
public static void setIntValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setStringValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setNStringValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setDoubleValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setNumericValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setBooleanValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setTinyIntValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setBigIntValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setRealValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setDateValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setTimeStampValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType, Calendar utcCalendar)
public static void setTimeValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType, Calendar utcCalendar)
public static void setBinaryValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setBlobValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setClobValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setNClobValue(PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setArrayValue(Connection conn, PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void setNullObject(PreparedStatement stmt, int index)
public static void setUserDefinedValue(Connection conn, PreparedStatement stmt, BValue value, int index, int direction, int sqlType)
public static void cleanupConnection(ResultSet rs, Statement stmt, Connection conn, boolean isInTransaction)
rs
- SQL resultsetstmt
- SQL statementconn
- SQL connectionpublic static TypeKind getColumnType(int sqlType)
sqlType
- SQL type in columnpublic static String getString(Clob data)
data
- clob datapublic static String getString(Blob data)
data
- blob datapublic static String getString(byte[] data)
data
- binary datapublic static String getString(Date value)
public static String getString(Timestamp value)
public static String getString(Time value)
public static String getString(Array dataArray) throws SQLException
SQLException
public static String getString(Struct udt) throws SQLException
SQLException
Copyright © 2018 WSO2. All rights reserved.