Modifier and Type | Method and Description |
---|---|
static SqlType |
bigInt()
Returns the BIG_INT SQL type.
|
static SqlType |
bool()
Returns the BOOL SQL type.
|
static SqlType |
bytes()
Returns the BYTES SQL type.
|
static SqlType |
character(int maxLength)
Returns the CHAR SQL type.
|
int |
compareTo(SqlType other)
Compares this SQL type with the specified SQL type for order.
|
static SqlType |
date()
Returns the DATE SQL type.
|
static SqlType |
doublePrecision()
Returns the DOUBLE PRECISION SQL type.
|
boolean |
equals(java.lang.Object that)
Checks two SQL types for equality.
|
static SqlType |
geography()
Returns the GEOGRAPHY SQL type.
|
int |
getInternalOid()
Returns the type oid.
|
java.util.OptionalInt |
getInternalTypeModifier()
Returns the internal type modifier.
|
java.util.OptionalInt |
getMaxLength()
Returns the maximum length of this type if it is CHAR or VARCHAR.
|
java.util.OptionalInt |
getPrecision()
Returns the precision if this type is NUMERIC.
|
java.util.OptionalInt |
getScale()
Returns the scale if this type is NUMERIC.
|
TypeTag |
getTag()
Returns the type tag.
|
int |
hashCode()
Computes a hash code.
|
static SqlType |
integer()
Returns the INT SQL type.
|
static SqlType |
interval()
Returns the INTERVAL SQL type.
|
static SqlType |
json()
Returns the JSON SQL type.
|
static SqlType |
numeric(int precision,
int scale)
Returns the NUMERIC SQL type.
|
static SqlType |
oid()
Returns the OID SQL type.
|
static SqlType |
smallInt()
Returns the SMALL_INT SQL type.
|
static SqlType |
text()
Returns the TEXT SQL type.
|
static SqlType |
time()
Returns the TIME SQL type.
|
static SqlType |
timestamp()
Returns the TIMESTAMP SQL type.
|
static SqlType |
timestampTz()
Returns the TIMESTAMP_TZ SQL type.
|
java.lang.String |
toString()
Return a string representation of this SQL type that can be used in SQL statements.
|
static SqlType |
varchar(int maxLength)
Returns the VARCHAR SQL type.
|
public static SqlType bool()
public static SqlType bigInt()
public static SqlType smallInt()
public static SqlType integer()
public static SqlType numeric(int precision, int scale)
scale
- The scale.precision
- The precision.public static SqlType doublePrecision()
public static SqlType oid()
public static SqlType bytes()
public static SqlType text()
public static SqlType varchar(int maxLength)
maxLength
- The maximum length of this VARCHAR typepublic static SqlType character(int maxLength)
maxLength
- The maximum length.public static SqlType json()
public static SqlType date()
public static SqlType interval()
public static SqlType time()
public static SqlType timestamp()
public static SqlType timestampTz()
public static SqlType geography()
public TypeTag getTag()
public int getInternalOid()
This is an internal method and may go away in future API versions.
public java.util.OptionalInt getInternalTypeModifier()
This is an internal method and may go away in future API versions.
public java.util.OptionalInt getPrecision()
public java.util.OptionalInt getScale()
public java.util.OptionalInt getMaxLength()
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
that
- The other SQL type.public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(SqlType other)
compareTo
in interface java.lang.Comparable<SqlType>
other
- The other SQL type.public java.lang.String toString()
toString
in class java.lang.Object