org.sql.generation.api.vendor
Interface PostgreSQLVendor

All Superinterfaces:
SQLVendor

public interface PostgreSQLVendor
extends SQLVendor

This is vendor for PostgreSQL database. PostgreSQL provides some extra SQL syntax elements for queries (notably LIMIT and OFFSET clauses), and this vendor gives access to factory, which enables the creation of these elements.

Author:
Stanislav Muhametsin
See Also:
PgSQLQueryFactory, LimitClause, OffsetClause

Method Summary
 PgSQLDataTypeFactory getDataTypeFactory()
          Returns the data type factory, which knows to create PostgreSQL-specific data types as well as pre-defined standard ones.
 PgSQLManipulationFactory getManipulationFactory()
          Returns the manipulation factory, which knows to create PostgreSQL-specific data manipulation statements.
 boolean legacyOffsetAndLimit()
          Returns whether the legacy (pre-8.4) OFFSET/LIMIT expressions are used instead of the OFFSET/FETCH defined in the SQL 2008 standard.
 void setLegacyOffsetAndLimit(boolean useLegacyOffsetAndLimit)
          Sets the switch to use legacy LIMIT/OFFSET expressions instead of the OFFSET/FETCH expressions of the SQL 2008 standard.
 
Methods inherited from interface org.sql.generation.api.vendor.SQLVendor
getBooleanFactory, getColumnsFactory, getDefinitionFactory, getLiteralFactory, getModificationFactory, getQueryFactory, getTableReferenceFactory, toString
 

Method Detail

getDataTypeFactory

PgSQLDataTypeFactory getDataTypeFactory()
Returns the data type factory, which knows to create PostgreSQL-specific data types as well as pre-defined standard ones.

Specified by:
getDataTypeFactory in interface SQLVendor
Returns:
The factory to create syntax elements for SQL data types.
See Also:
DataTypeFactory

getManipulationFactory

PgSQLManipulationFactory getManipulationFactory()
Returns the manipulation factory, which knows to create PostgreSQL-specific data manipulation statements.

Specified by:
getManipulationFactory in interface SQLVendor
Returns:
The factory to create manipulation statements.
See Also:
ManipulationFactory

legacyOffsetAndLimit

boolean legacyOffsetAndLimit()
Returns whether the legacy (pre-8.4) OFFSET/LIMIT expressions are used instead of the OFFSET/FETCH defined in the SQL 2008 standard. For more information, see http://www.postgresql.org/docs/8.3/static/sql-select.html#SQL-LIMIT . This method is not thread-safe.

Returns:
true if the legacy OFFSET/LIMIT expressions are used; false otherwise.

setLegacyOffsetAndLimit

void setLegacyOffsetAndLimit(boolean useLegacyOffsetAndLimit)
Sets the switch to use legacy LIMIT/OFFSET expressions instead of the OFFSET/FETCH expressions of the SQL 2008 standard. This is necessary only for pre-8.4 PgSQL databases. For more information, see http://www.postgresql.org/docs/8.3/static/sql-select.html#SQL-LIMIT . This method is not thread-safe.

Parameters:
useLegacyOffsetAndLimit - Whether to use legacy LIMIT/OFFSET expressions instead of the OFFSET/FETCH expressions defined in the SQL 2008 standard.


Copyright © 2010-2012. All Rights Reserved.