org.jooq.util.postgres
Class PostgresUtils

java.lang.Object
  extended by org.jooq.util.postgres.PostgresUtils

public class PostgresUtils
extends Object

A collection of utilities to cover the Postgres JDBC driver's missing implementations.

The Postgres JDBC driver is known to miss out on quite a few JDBC feature implementations. This class should fill those gaps.

Author:
Lukas Eder, Peter Ertl

Constructor Summary
PostgresUtils()
           
 
Method Summary
static byte[] toBytes(String string)
          Parse a Postgres-encoded bytea string
static DayToSecond toDayToSecond(Object pgInterval)
          Convert a Postgres interval to a jOOQ DAY TO SECOND interval
static Object toPGInterval(DayToSecond interval)
          Convert a jOOQ DAY TO SECOND interval to a Postgres representation
static Object toPGInterval(YearToMonth interval)
          Convert a jOOQ YEAR TO MONTH interval to a Postgres representation
static List<String> toPGObject(String input)
          Tokenize a PGObject input string
static YearToMonth toYearToMonth(Object pgInterval)
          Convert a Postgres interval to a jOOQ YEAR TO MONTH interval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresUtils

public PostgresUtils()
Method Detail

toBytes

public static byte[] toBytes(String string)
Parse a Postgres-encoded bytea string


toPGInterval

public static Object toPGInterval(DayToSecond interval)
Convert a jOOQ DAY TO SECOND interval to a Postgres representation


toPGInterval

public static Object toPGInterval(YearToMonth interval)
Convert a jOOQ YEAR TO MONTH interval to a Postgres representation


toDayToSecond

public static DayToSecond toDayToSecond(Object pgInterval)
Convert a Postgres interval to a jOOQ DAY TO SECOND interval


toYearToMonth

public static YearToMonth toYearToMonth(Object pgInterval)
Convert a Postgres interval to a jOOQ YEAR TO MONTH interval


toPGObject

public static List<String> toPGObject(String input)
Tokenize a PGObject input string



Copyright © 2012. All Rights Reserved.