org.eclipse.net4j.db.postgresql

## Class PostgreSQLAdapter

- java.lang.Object
- - org.eclipse.net4j.spi.db.DBAdapter
  - - org.eclipse.net4j.db.postgresql.PostgreSQLAdapter

- All Implemented Interfaces:
    IDBAdapter

      public class PostgreSQLAdapter
      extends DBAdapter

  A `DB adapter` for PostgreSQL databases.
  Author:
    Victor Roldan Betancort

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.net4j.spi.db.DBAdapter

      `DBAdapter.FieldInfo`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `NAME`
    `static String` | `VERSION`

    - ### Fields inherited from interface org.eclipse.net4j.db.IDBAdapter

      `REGISTRY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PostgreSQLAdapter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doCreateTable(IDBTable table, Statement statement)`
    `int` | `getMaxFieldNameLength()`
    `int` | `getMaxTableNameLength()`
    `String[]` | `getReservedWords()`
    `protected String` | `getTypeName(IDBField field)`
    `boolean` | `isColumnNotFoundException(SQLException ex)` See Appendix A.
    `boolean` | `isDuplicateKeyException(SQLException ex)` See Appendix A.
    `boolean` | `isTableNotFoundException(SQLException ex)` See Appendix A.

    - ### Methods inherited from class org.eclipse.net4j.spi.db.DBAdapter

      `adaptType, addIndex, addIndexField, alterTable, appendFieldDefs, appendFieldNames, convertString, convertString, convertString, createConnectionProvider, createConstraints, createField, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createTable, createTable, createTables, dropField, dropIndex, dropIndex, dropPrimaryKey, dropTable, dropTable, dropTables, format, format, getDefaultDBLength, getDropTableSQL, getFieldLength, getJDBCDriver, getName, getSQL92ReservedWords, getVersion, isPrimaryKeyShadow, isReservedWord, isTypeIndexable, isValidFirstChar, modifyConnection, readFields, readIndices, readIndices, readSchema, readSchema, readTables, sqlModifyField, sqlModifyField, sqlRenameField, toString, updateSchema, validateTable`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### NAME

          public static final String NAME

      See Also:
        Constant Field Values

    - #### VERSION

          public static final String VERSION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PostgreSQLAdapter

          public PostgreSQLAdapter()

  - ### Method Detail

    - #### getMaxTableNameLength

          public int getMaxTableNameLength()

      Specified by:
        `getMaxTableNameLength` in interface `IDBAdapter`
      Overrides:
        `getMaxTableNameLength` in class `DBAdapter`
      Since:
        2.0

    - #### getMaxFieldNameLength

          public int getMaxFieldNameLength()

      Specified by:
        `getMaxFieldNameLength` in interface `IDBAdapter`
      Overrides:
        `getMaxFieldNameLength` in class `DBAdapter`
      Since:
        2.0

    - #### getTypeName

          protected String getTypeName(IDBField field)

      Overrides:
        `getTypeName` in class `DBAdapter`

    - #### getReservedWords

          public String[] getReservedWords()

    - #### isDuplicateKeyException

          public boolean isDuplicateKeyException(SQLException ex)

      See Appendix A. PostgreSQL Error Codes.
      Specified by:
        `isDuplicateKeyException` in interface `IDBAdapter`
      Overrides:
        `isDuplicateKeyException` in class `DBAdapter`

    - #### isTableNotFoundException

          public boolean isTableNotFoundException(SQLException ex)

      See Appendix A. PostgreSQL Error Codes.
      Specified by:
        `isTableNotFoundException` in interface `IDBAdapter`
      Overrides:
        `isTableNotFoundException` in class `DBAdapter`

    - #### isColumnNotFoundException

          public boolean isColumnNotFoundException(SQLException ex)

      See Appendix A. PostgreSQL Error Codes.
      Specified by:
        `isColumnNotFoundException` in interface `IDBAdapter`
      Overrides:
        `isColumnNotFoundException` in class `DBAdapter`

    - #### doCreateTable

          protected void doCreateTable(IDBTable table,
                                       Statement statement)
                                throws SQLException

      Overrides:
        `doCreateTable` in class `DBAdapter`
      Throws:
        `SQLException`
      Since:
        4.1

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html