public class PostgresAdapter extends AbstractAdapter
ADAPTER_KEY, AUTODETECT_ADAPTER, DRIVER_KEY
Modifier | Constructor and Description |
---|---|
protected |
PostgresAdapter()
Empty constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
generateLimits(Query query,
long offset,
int limit)
Generate a LIMIT limit OFFSET offset clause if offset > 0
or an LIMIT limit clause if limit is > 0 and offset
is 0.
|
String |
getIDMethodSQL(Object name)
Returns SQL used to get the most recently inserted primary key.
|
IDMethod |
getIDMethodType()
Returns the constant from the
IDMethod interface denoting which
type of primary key generation method this type of RDBMS uses. |
String |
ignoreCase(String in)
This method is used to ignore case.
|
void |
lockTable(Connection con,
String table)
Locks the specified table.
|
String |
toUpperCase(String in)
This method is used to ignore case.
|
void |
unlockTable(Connection con,
String table)
Unlocks the specified table.
|
boolean |
useIlike()
Whether ILIKE should be used for case insensitive like clauses.
|
escapeText, getStringDelimiter, getUpdateLockClause, ignoreCaseInOrderBy, setCapabilities, supportsNativeLimit, supportsNativeOffset, useEscapeClauseForLike, useGetGeneratedKeys, useMinusForExcept
public String toUpperCase(String in)
toUpperCase
in interface Adapter
toUpperCase
in class AbstractAdapter
in
- The string to transform to upper case.public String ignoreCase(String in)
ignoreCase
in interface Adapter
ignoreCase
in class AbstractAdapter
in
- The string whose case to ignore.public IDMethod getIDMethodType()
AbstractAdapter
IDMethod
interface denoting which
type of primary key generation method this type of RDBMS uses.getIDMethodType
in interface Adapter
getIDMethodType
in class AbstractAdapter
Adapter.getIDMethodType()
public String getIDMethodSQL(Object name)
AbstractAdapter
null
.getIDMethodSQL
in interface Adapter
getIDMethodSQL
in class AbstractAdapter
name
- The name of the field (should be of type
String
).Adapter.getIDMethodSQL(Object)
public void lockTable(Connection con, String table) throws SQLException
lockTable
in interface Adapter
lockTable
in class AbstractAdapter
con
- The JDBC connection to use.table
- The name of the table to lock.SQLException
- No Statement could be created or executed.public void unlockTable(Connection con, String table) throws SQLException
unlockTable
in interface Adapter
unlockTable
in class AbstractAdapter
con
- The JDBC connection to use.table
- The name of the table to unlock.SQLException
- No Statement could be created or executed.public void generateLimits(Query query, long offset, int limit)
generateLimits
in interface Adapter
generateLimits
in class AbstractAdapter
query
- The query to modifyoffset
- the offset Valuelimit
- the limit Valuepublic boolean useIlike()
useIlike
in interface Adapter
useIlike
in class AbstractAdapter
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.