This class is a sql adapter for the SQL Server relational database.
getCharArray
public char[] getCharArray(ResultSet rs,
int idx,
char[] nullValue)
throws SQLException Get a char[] value from a ResultSet.
- getCharArray in interface ResultsetAdapter
- getCharArray in interface BasicRdbAdapter
rs - is the result where to get the valueidx - is the index of the value in the resultsetnullValue - represents the nullvalue to return if the column is null
in the resultset
getCreateSequence
public String getCreateSequence(String seqName)
throws UnsupportedOperationException- getCreateSequence in interface SequenceAdapter
- getCreateSequence in interface BasicRdbAdapter
seqName - is the sequence name
- the SQL command to create a sequence
getCreateSequence
public String getCreateSequence(String seqName,
Integer startid,
Integer inc,
Integer cache) CREATE [ TEMPORARY | TEMP ] SEQUENCE name [ INCREMENT [ BY ] increment ] [
MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ] [
START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
- getCreateSequence in interface SequenceAdapter
- getCreateSequence in interface BasicRdbAdapter
seqName - startid - inc -
getSqlType
public String getSqlType(int typeCode,
boolean usedInPK,
int size,
int scale)
throws RdbAdapterException This method returns the SQL type linked to the java type
- getSqlType in interface TypeAdapter
- getSqlType in interface BasicRdbAdapter
typeCode - is the type code of the java typeusedInPK - indicates if the type has to be used into a Primary keysize - can indicates the expected size of the type. If it equals to
NO_SIZE that means no size is expected. This parameter can be used for
float, BigXXX numbers, String,...scale - can indicates the expected scale of the type. If it equals to
NO_SIZE that means no scale is expected.
setCharArray
public void setCharArray(PreparedStatement ps,
int idx,
char[] o)
throws SQLException Assignes a value into a PreparedStatement
- setCharArray in interface PreparedStatementAdapter
- setCharArray in interface BasicRdbAdapter
ps - is the PreparedStatementidx - is the index of the the value in the PreparedStatemento - is the value to assign
setObyte
public void setObyte(PreparedStatement ps,
int idx,
Byte o)
throws SQLException Assignes a value into a PreparedStatement
- setObyte in interface PreparedStatementAdapter
- setObyte in interface BasicRdbAdapter
ps - is the PreparedStatementidx - is the index of the the value in the PreparedStatemento - is the value to assign
setOchar
public void setOchar(PreparedStatement ps,
int idx,
Character o)
throws SQLException Assignes a value into a PreparedStatement
- setOchar in interface PreparedStatementAdapter
- setOchar in interface BasicRdbAdapter
ps - is the PreparedStatementidx - is the index of the the value in the PreparedStatemento - is the value to assign