public class PostgresqlAdapter extends AbstractDatabase
Constructor and Description |
---|
PostgresqlAdapter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDateTimeFunction()
The PostgreSQL function name that gets the current date
and time from the database server
|
java.lang.String |
getIsNULLFunction()
The PostgreSQL function name that is used to return non-NULL value
|
java.lang.String |
getLeftJoinQuery(java.lang.String selectFields,
java.lang.String tableA,
java.lang.String tableB,
java.lang.String joinCriteria,
java.lang.String nonJoinCriteria)
PostgreSQL's syntax for doing a left join
Add 'a.' in front of the fields for first table and
'b.' in front of the fields for the second table
|
java.lang.String |
getPagedQuery(java.lang.String queryWithOrderBy,
java.lang.Integer start,
java.lang.Integer count)
for generating a query for paging
|
java.lang.String |
getReplicationDocumentListSQL()
Return a hard code string to get xml_document list in timed replcation
|
java.lang.String |
getStringDelimiter()
PostgreSQL's string delimiter character: single quote (')
|
long |
getUniqueID(java.sql.Connection conn,
java.lang.String tableName)
The PostgreSQL unique ID /sequence generator
The name of the sequence used to generate the unique id
is made from the name of the table that uses the id by
appending "_id_seq" to it.
|
createObject, main, toDate
public long getUniqueID(java.sql.Connection conn, java.lang.String tableName) throws java.sql.SQLException
getUniqueID
in class AbstractDatabase
conn
- db connection in which the unique id was generatedtableName
- the name of table which unique id was generatejava.sql.SQLException
- any SQLException that can be thrown
during the db operationpublic java.lang.String getDateTimeFunction()
getDateTimeFunction
in class AbstractDatabase
public java.lang.String getIsNULLFunction()
getIsNULLFunction
in class AbstractDatabase
public java.lang.String getStringDelimiter()
getStringDelimiter
in class AbstractDatabase
public java.lang.String getLeftJoinQuery(java.lang.String selectFields, java.lang.String tableA, java.lang.String tableB, java.lang.String joinCriteria, java.lang.String nonJoinCriteria)
getLeftJoinQuery
in class AbstractDatabase
selectFields
- fields that you want to be selectedtableA
- first table in the jointableB
- second table in the joinjoinCriteria
- the criteria based on which the join will be madenonJoinCriteria
- all other criteriaspublic java.lang.String getReplicationDocumentListSQL()
getReplicationDocumentListSQL
in class AbstractDatabase
public java.lang.String getPagedQuery(java.lang.String queryWithOrderBy, java.lang.Integer start, java.lang.Integer count)
AbstractDatabase
getPagedQuery
in class AbstractDatabase
queryWithOrderBy
- - the complete query with SELECT, FROM, WHERE and ORDER BY clausesstart
- the row number to start fromcount
- the number of records from start to returnCopyright © 2023 Regents of the University of California. All Rights Reserved.