org.ujorm.orm.dialect
Class PostgreSqlDialect

java.lang.Object
  extended by org.ujorm.orm.SqlDialect
      extended by org.ujorm.orm.dialect.PostgreSqlDialect
Direct Known Subclasses:
OracleDialect

public class PostgreSqlDialect
extends SqlDialect

PostgreSQL (http://www.postgresql.org/)


Field Summary
 
Fields inherited from class org.ujorm.orm.SqlDialect
COMMON_SEQ_TABLE_KEY, DEFAULT_SCHEMA_SYMBOL, ormHandler
 
Constructor Summary
PostgreSqlDialect()
           
 
Method Summary
protected  String getColumnType(MetaColumn column)
          PostgreSql dialect uses a database type OID (instead of the BLBO).
 String getJdbcDriver()
          Returns a JDBC driver class name.
 String getJdbcUrl()
          Returns a default JDBC URL
 Appendable printCreateSchema(String schema, Appendable out)
          Print SQL 'CREATE SCHEMA'
 Appendable printDelete(CriterionDecoder decoder, Appendable out)
          Print an SQL DELETE statement.
 Appendable printIndex(MetaIndex index, Appendable out)
          Print an INDEX for the parameter column.
 Appendable printIndexCondition(MetaIndex index, Appendable out)
          Create an PARTIAL INDEX for exclude NULL values.
 void printOffset(Query query, Appendable out)
          Print an OFFSET of the statement SELECT.
 
Methods inherited from class org.ujorm.orm.SqlDialect
createConnection, createJndiInitialContext, createSubQuery, escape, getAliasColumnName, getCriterionTemplate, getExtentedDialect, getKeywordSet, getNameProvider, getQuotedName, getSeqTableModel, isCatalog, isColumnLengthAllowed, isFilled, isMultiRowInsertSupported, printAlterTableAddColumn, printAlterTableColumn, printCall, printColumnAlias, printColumnDeclaration, printComment, printComment, printCommit, printCriterion, printCriterionValue, printDefaultConstraint, printDefaultSchema, printDefaultValue, printFKColumnsDeclaration, printForeignKey, printForeignKey, printFullTableName, printFullTableName, printInsert, printInsert, printInsertBySelect, println, printLockForSelect, printNextSequence, printQuotedName, printQuotedNameAlways, printSelect, printSelectOrder, printSelectTable, printSelectTableBase, printSelectView, printSequenceCurrentValue, printSequenceDeleteById, printSequenceInit, printSequenceInitWithValues, printSequenceNextValue, printSequenceTable, printSequenceTableName, printSetMaxSequence, printTable, printTableAliasDefinition, printTableColumns, printUpdate, releaseSavepoint, setHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgreSqlDialect

public PostgreSqlDialect()
Method Detail

getJdbcUrl

public String getJdbcUrl()
Description copied from class: SqlDialect
Returns a default JDBC URL

Specified by:
getJdbcUrl in class SqlDialect

getJdbcDriver

public String getJdbcDriver()
Description copied from class: SqlDialect
Returns a JDBC driver class name.

Specified by:
getJdbcDriver in class SqlDialect

printCreateSchema

public Appendable printCreateSchema(String schema,
                                    Appendable out)
                             throws IOException
Print SQL 'CREATE SCHEMA'

Overrides:
printCreateSchema in class SqlDialect
Throws:
IOException

getColumnType

protected String getColumnType(MetaColumn column)
PostgreSql dialect uses a database type OID (instead of the BLBO).

Overrides:
getColumnType in class SqlDialect

printIndex

public Appendable printIndex(MetaIndex index,
                             Appendable out)
                      throws IOException
Print an INDEX for the parameter column.

Overrides:
printIndex in class SqlDialect
Returns:
More statements separated by the ';' charactes are enabled
Throws:
IOException

printIndexCondition

public Appendable printIndexCondition(MetaIndex index,
                                      Appendable out)
                               throws IOException
Create an PARTIAL INDEX for exclude NULL values. The behaviour is similar like the PostgreSQL or ORACLE databases.
NOTE: you can disable the feature by the overwriting current method by an empty body.

Throws:
IOException

printOffset

public void printOffset(Query query,
                        Appendable out)
                 throws IOException
Print an OFFSET of the statement SELECT.

Overrides:
printOffset in class SqlDialect
Throws:
IOException

printDelete

public Appendable printDelete(CriterionDecoder decoder,
                              Appendable out)
                       throws IOException
Print an SQL DELETE statement.

Overrides:
printDelete in class SqlDialect
Throws:
IOException


Copyright 2013, Pavel Ponec