public class PostgresUtils
extends java.lang.Object
The Postgres JDBC driver is known to miss out on quite a few JDBC feature implementations. This class should fill those gaps.
Constructor and Description |
---|
PostgresUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
toBytes(java.lang.String string)
Parse a Postgres-encoded
bytea string |
static DayToSecond |
toDayToSecond(java.lang.Object pgInterval)
Convert a Postgres interval to a jOOQ
DAY TO SECOND interval |
static java.lang.String |
toPGArrayString(java.lang.Object[] value)
Create a Postgres string representation of an array
|
static java.lang.Object |
toPGInterval(DayToSecond interval)
Convert a jOOQ
DAY TO SECOND interval to a Postgres representation |
static java.lang.Object |
toPGInterval(YearToMonth interval)
Convert a jOOQ
YEAR TO MONTH interval to a Postgres representation |
static java.util.List<java.lang.String> |
toPGObject(java.lang.String input)
Tokenize a PGObject input string
|
static YearToMonth |
toYearToMonth(java.lang.Object pgInterval)
Convert a Postgres interval to a jOOQ
YEAR TO MONTH interval |
public static byte[] toBytes(java.lang.String string)
bytea
stringpublic static java.lang.Object toPGInterval(DayToSecond interval)
DAY TO SECOND
interval to a Postgres representationpublic static java.lang.Object toPGInterval(YearToMonth interval)
YEAR TO MONTH
interval to a Postgres representationpublic static DayToSecond toDayToSecond(java.lang.Object pgInterval)
DAY TO SECOND
intervalpublic static YearToMonth toYearToMonth(java.lang.Object pgInterval)
YEAR TO MONTH
intervalpublic static java.util.List<java.lang.String> toPGObject(java.lang.String input)
public static java.lang.String toPGArrayString(java.lang.Object[] value)
Copyright © 2014. All Rights Reserved.