java.lang.Object
org.jooq.util.postgres.PostgresUtils
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Parse a Postgres-encodedbytea
stringstatic DayToSecond
toDayToSecond(Object pgInterval)
Convert a Postgres interval to a jOOQDAY TO SECOND
intervalTokenize a PGObject input string.static String
toPGArrayString(Object[] value)
Create a Postgres string representation of an arraystatic Object
toPGInterval(DayToSecond interval)
Convert a jOOQDAY TO SECOND
interval to a Postgres representationstatic Object
toPGInterval(YearToMonth interval)
Convert a jOOQYEAR TO MONTH
interval to a Postgres representationstatic Object
toPGInterval(YearToSecond interval)
Convert a jOOQYEAR TO SECOND
interval to a Postgres representationtoPGObject(String input)
Tokenize a PGObject input string.static String
toPGString(byte[] binary)
Create a PostgreSQL string representation of a binary.static String
toPGString(Object o)
Create a PostgreSQL string representation of any object.static String
toPGString(Record r)
Create a PostgreSQL string representation of a record.static Object
toRedshiftInterval(DayToSecond interval)
Convert a jOOQDAY TO SECOND
interval to a Redshift representationstatic Object
toRedshiftInterval(YearToMonth interval)
Convert a jOOQYEAR TO MONTH
interval to a Redshift representationstatic Object
toRedshiftInterval(YearToSecond interval)
Convert a jOOQYEAR TO SECOND
interval to a Redshift representationstatic YearToMonth
toYearToMonth(Object pgInterval)
Convert a Postgres interval to a jOOQYEAR TO MONTH
intervalstatic YearToSecond
toYearToSecond(Object pgInterval)
Convert a Postgres interval to a jOOQYEAR TO SECOND
interval
-
Constructor Details
-
PostgresUtils
public PostgresUtils()
-
-
Method Details
-
toBytes
Parse a Postgres-encodedbytea
string -
toPGInterval
Convert a jOOQDAY TO SECOND
interval to a Postgres representation -
toPGInterval
Convert a jOOQYEAR TO SECOND
interval to a Postgres representation -
toPGInterval
Convert a jOOQYEAR TO MONTH
interval to a Postgres representation -
toRedshiftInterval
Convert a jOOQDAY TO SECOND
interval to a Redshift representation -
toRedshiftInterval
Convert a jOOQYEAR TO SECOND
interval to a Redshift representation -
toRedshiftInterval
Convert a jOOQYEAR TO MONTH
interval to a Redshift representation -
toDayToSecond
Convert a Postgres interval to a jOOQDAY TO SECOND
interval -
toYearToMonth
Convert a Postgres interval to a jOOQYEAR TO MONTH
interval -
toYearToSecond
Convert a Postgres interval to a jOOQYEAR TO SECOND
interval -
toPGArray
Tokenize a PGObject input string. -
toPGObject
Tokenize a PGObject input string. -
toPGArrayString
Create a Postgres string representation of an array -
toPGString
Create a PostgreSQL string representation of any object. -
toPGString
Create a PostgreSQL string representation of a record. -
toPGString
Create a PostgreSQL string representation of a binary.
-