existRelation
protected boolean existRelation(Connection connection,
String relName,
String[] relationTypes)
throws SQLException
- existRelation in interface BasicRdbAdapter
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
-
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)
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
getSubstringName
public String getSubstringName()
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