Package org.javalite.activejdbc.dialects
Class PostgreSQLDialect
java.lang.Object
org.javalite.activejdbc.dialects.DefaultDialect
org.javalite.activejdbc.dialects.PostgreSQLDialect
- All Implemented Interfaces:
Serializable
,Dialect
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class org.javalite.activejdbc.dialects.DefaultDialect
GROUP_BY_PATTERN, ORDER_BY_PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendQuestionsForUpdate(MetaModel metaModel, StringBuilder query, List<String> columns)
Appends PostgreSQL - specific code: "description = ?::varchar,status = ?::status_type"void
appendTypedQuestionsInsert(MetaModel metaModel, StringBuilder query, List<String> columns)
Attention, this method has a side effect, it modifies the "query" parameter query - example passed in: "INSERT INTO statuses (status) VALUES (" query - after this method: "INSERT INTO statuses (status) VALUES (?::status_type" In other words, it appends a type for every value placeholder.formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset)
Generates adds limit, offset and order bys to a sub-queryinsertParametrized(MetaModel metaModel, List<String> columns, boolean containsId)
toArray(String typeName, Object value, Connection connection)
Converts the inputMethods inherited from class org.javalite.activejdbc.dialects.DefaultDialect
appendDate, appendEmptyRow, appendOrderBy, appendQuestions, appendSelect, appendSubQuery, appendTime, appendTimestamp, appendValue, deleteManyToManyAssociation, insert, insertManyToManyAssociation, overrideDriverTypeConversion, replace, selectCount, selectCount, selectExists, selectManyToManyAssociation, selectStar, selectStar, selectStarParametrized, update
-
Constructor Details
-
PostgreSQLDialect
public PostgreSQLDialect()
-
-
Method Details
-
formSelect
public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset)Generates adds limit, offset and order bys to a sub-query- Specified by:
formSelect
in interfaceDialect
- Overrides:
formSelect
in classDefaultDialect
- Parameters:
tableName
- name of table. If table name is null, then the subQuery parameter is considered to be a full query, and all that needs to be done is to add limit, offset and order byscolumns
- not used in this implementationsubQuery
- sub-query or a full queryorderBys
-limit
-offset
-- Returns:
- query with
-
insertParametrized
- Specified by:
insertParametrized
in interfaceDialect
- Overrides:
insertParametrized
in classDefaultDialect
-
appendTypedQuestionsInsert
public void appendTypedQuestionsInsert(MetaModel metaModel, StringBuilder query, List<String> columns)Attention, this method has a side effect, it modifies the "query" parameter query - example passed in: "INSERT INTO statuses (status) VALUES (" query - after this method: "INSERT INTO statuses (status) VALUES (?::status_type" In other words, it appends a type for every value placeholder. -
appendQuestionsForUpdate
public void appendQuestionsForUpdate(MetaModel metaModel, StringBuilder query, List<String> columns)Appends PostgreSQL - specific code: "description = ?::varchar,status = ?::status_type"- Specified by:
appendQuestionsForUpdate
in interfaceDialect
- Overrides:
appendQuestionsForUpdate
in classDefaultDialect
- Parameters:
metaModel
- metamodel instance
-
toArray
Description copied from class:DefaultDialect
Converts the input- Specified by:
toArray
in interfaceDialect
- Overrides:
toArray
in classDefaultDialect
-