org.apache.lucene.store.jdbc.dialect
Class PostgreSQLDialect

java.lang.Object
  extended by org.apache.lucene.store.jdbc.dialect.Dialect
      extended by org.apache.lucene.store.jdbc.dialect.PostgreSQLDialect

public class PostgreSQLDialect
extends Dialect

A PostgreSQL dialect.

Author:
kimchy

Constructor Summary
PostgreSQLDialect()
           
 
Method Summary
 String getBitType()
          The database BIT type.
 String getBlobType(long length)
          The database blob type for the given length.
 String getCurrentTimestampFunction()
          The database current timestamp function that is used with several sql updates.
 String getCurrentTimestampSelectString()
          The database current time stamp select query.
 String getNumberType()
          The database number type.
 String getTimestampType()
          The database TIMESTAMP type.
 String getVarcharType(int length)
          The database varchar type for the given length.
 boolean isCurrentTimestampSelectStringCallable()
          If the current timestamp select queyr is a callable query or not.
 String sqlTableExists(String catalog, String schemaName)
          If the dialect support a special query to check if a table exists, the actual sql that is used to perform it.
 boolean supportsCurrentTimestampSelection()
          Does the database supports a query for the current timestamp.
 boolean supportsForUpdate()
          PostreSQL supports select ... for update.
 boolean supportsTableExists()
          PostrgreSQL supports a table exists query.
 boolean supportTransactionalScopedBlobs()
          PostgreSQL supports transactional scoped blobs.
 boolean useInputStreamToInsertBlob()
          Does the database require using an InputStream to insert a blob, or the setBlob method.
 
Methods inherited from class org.apache.lucene.store.jdbc.dialect.Dialect
closeBlobSelectQuote, closeQuote, getCascadeConstraintsString, getForUpdateNowaitString, getForUpdateString, getTableTypeString, openBlobSelectQuote, openQuote, processSettings, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, useExistsBeforeInsertLock
 
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

supportsForUpdate

public boolean supportsForUpdate()
PostreSQL supports select ... for update.

Specified by:
supportsForUpdate in class Dialect

supportTransactionalScopedBlobs

public boolean supportTransactionalScopedBlobs()
PostgreSQL supports transactional scoped blobs.

Overrides:
supportTransactionalScopedBlobs in class Dialect

supportsTableExists

public boolean supportsTableExists()
PostrgreSQL supports a table exists query.

Overrides:
supportsTableExists in class Dialect

sqlTableExists

public String sqlTableExists(String catalog,
                             String schemaName)
Description copied from class: Dialect
If the dialect support a special query to check if a table exists, the actual sql that is used to perform it. Defaults to throw an Unsupported excetion (see Dialect.supportsTableExists().

Overrides:
sqlTableExists in class Dialect

supportsCurrentTimestampSelection

public boolean supportsCurrentTimestampSelection()
Description copied from class: Dialect
Does the database supports a query for the current timestamp. Defaults to false.

Overrides:
supportsCurrentTimestampSelection in class Dialect

isCurrentTimestampSelectStringCallable

public boolean isCurrentTimestampSelectStringCallable()
Description copied from class: Dialect
If the current timestamp select queyr is a callable query or not.

Overrides:
isCurrentTimestampSelectStringCallable in class Dialect

useInputStreamToInsertBlob

public boolean useInputStreamToInsertBlob()
Description copied from class: Dialect
Does the database require using an InputStream to insert a blob, or the setBlob method. Defaults to true.

Overrides:
useInputStreamToInsertBlob in class Dialect

getCurrentTimestampSelectString

public String getCurrentTimestampSelectString()
Description copied from class: Dialect
The database current time stamp select query.

Overrides:
getCurrentTimestampSelectString in class Dialect

getVarcharType

public String getVarcharType(int length)
Description copied from class: Dialect
The database varchar type for the given length. The length is in chars.

Specified by:
getVarcharType in class Dialect

getBlobType

public String getBlobType(long length)
Description copied from class: Dialect
The database blob type for the given length. The length is in KB.

Specified by:
getBlobType in class Dialect

getNumberType

public String getNumberType()
Description copied from class: Dialect
The database number type.

Specified by:
getNumberType in class Dialect

getTimestampType

public String getTimestampType()
Description copied from class: Dialect
The database TIMESTAMP type.

Specified by:
getTimestampType in class Dialect

getCurrentTimestampFunction

public String getCurrentTimestampFunction()
Description copied from class: Dialect
The database current timestamp function that is used with several sql updates.

Specified by:
getCurrentTimestampFunction in class Dialect

getBitType

public String getBitType()
Description copied from class: Dialect
The database BIT type.

Specified by:
getBitType in class Dialect


Copyright (c) 2004-2008 The Compass Project.