escapeFunctionClose
public void escapeFunctionClose(StringBuffer sb)
Modifies the end of a function expression for the escape syntax.
The JDBC standard syntax is "fn{function}".
- escapeFunctionClose in interface RdbAdapter
- escapeFunctionClose in interface BasicRdbAdapter
existRelation
protected boolean existRelation(Connection connection,
String relName,
String[] relationTypes)
throws SQLException
- existRelation in interface BasicRdbAdapter
existSequence
public boolean existSequence(Connection connection,
String seqName)
throws SQLException
checks the sequence existence
- existSequence in interface SequenceAdapter
- existSequence in interface BasicRdbAdapter
connection
- is the JDBC connection to useseqName
- is the sequence of the table
- true if the table exists, otherwise false.
fetchResultSetSize
public int fetchResultSetSize(ResultSet rs)
throws SQLException
This calculates the size of a result set. If this feature is not supported
by a database or its jdbc driver, this method returns -1.
- fetchResultSetSize in interface RdbAdapter
- fetchResultSetSize in interface BasicRdbAdapter
rs
- the result set which the size must be returned
getFirstLocateExpression
public String getFirstLocateExpression(String substring,
String instring)
Returns the expression for searching the position of the first occurrence
of a substring in a string.
Three main syntaxes are found: position(substr in str), locate(substr, srt)
and instr(str, substr).
- getFirstLocateExpression in interface RdbAdapter
- getFirstLocateExpression in interface BasicRdbAdapter
substring
- The substring searchedinstring
- The string in which to search the substring
- The corresponding relational expression.
getIndexedLocateExpression
public String getIndexedLocateExpression(String instring,
String substring,
String fromIndex)
throws RdbAdapterException
Returns the expression for searching the position of the first occurrence
of a substring in a string starting from a given index.
Two main syntaxes are found: instr() and locate()
- getIndexedLocateExpression in interface RdbAdapter
- getIndexedLocateExpression in interface BasicRdbAdapter
substring
- The substring searchedfromIndex
- The index from which to start searching
- The corresponding relational expression.
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.
getSubqueryAlias
public String getSubqueryAlias()
In the case the subquery needs to be aliased (Postgres), returns a string
to be appended to the subquery.
- getSubqueryAlias in interface RdbAdapter
- getSubqueryAlias in interface BasicRdbAdapter
- the String to be appended to the subquery
getValueAsSQLString
public String getValueAsSQLString(Object value,
int typeCode)
This method returns a String value that represents a value. This method
can be used for the constant parameters of SQL queries.
- getValueAsSQLString in interface ValueAsSQLStringAdapter
- getValueAsSQLString in interface BasicRdbAdapter
value
- typeCode
- is the java type of the value
getValueAsSQLString
public String getValueAsSQLString(boolean value)
This method returns a String value that represents a boolean value. This
method can be used for the constant parameters of SQL queries.
- getValueAsSQLString in interface ValueAsSQLStringAdapter
- getValueAsSQLString in interface BasicRdbAdapter
modifyWhereClauseWithRange
protected void modifyWhereClauseWithRange(StringBuffer sb,
String _where,
int rangeStart,
int rangeSize)
- modifyWhereClauseWithRange in interface BasicRdbAdapter