| Modifier and Type | Field and Description |
|---|---|
static int |
HSTORE
Type to map Map content to Postgres HSTORE.
|
static int |
JSON
Type to map JSON content to Clob or Postgres JSON type.
|
static int |
JSONB
Type to map JSON content to Clob or Postgres JSONB type.
|
static int |
JSONBlob
Type to map JSON content to Blob.
|
static int |
JSONClob
Type to map JSON content to Clob.
|
static int |
JSONVarchar
Type to map JSON content to VARCHAR.
|
static int |
UUID
DB native UUID type (H2 and Postgres).
|
| Constructor and Description |
|---|
DbType(String name)
Construct with no length or scale.
|
DbType(String name,
boolean canHaveLength)
Use with canHaveLength=false for types that should never have a length.
|
DbType(String name,
int defaultLength)
Construct with a given length.
|
DbType(String name,
int defaultPrecision,
int defaultScale)
Construct for Decimal with precision and scale.
|
| Modifier and Type | Method and Description |
|---|---|
String |
renderType(int deployLength,
int deployScale)
Return the type for a specific property that incorporates the name, length,
precision and scale.
|
String |
renderType(int deployLength,
int deployScale,
boolean strict)
Render the type defining strict mode.
|
DbType |
withLength(int defaultLength)
Create a copy of the type with a new default length.
|
public static final int UUID
public static final int HSTORE
public static final int JSON
public static final int JSONB
public static final int JSONVarchar
public static final int JSONClob
public static final int JSONBlob
public DbType(String name, int defaultPrecision, int defaultScale)
public String renderType(int deployLength, int deployScale)
The deployLength and deployScale are for the property we are rendering the DB type for.
deployLength - the length or precision defined by deployment on a specific
property.deployScale - the scale defined by deployment on a specific property.public String renderType(int deployLength, int deployScale, boolean strict)
If strict mode if OFF then this will render with a scale value even if that is not strictly supported. The reason for supporting this is to enable use to use types like jsonb(200) as a "logical" type that maps to JSONB for Postgres and VARCHAR(200) for other databases.
public DbType withLength(int defaultLength)
Copyright © 2016. All rights reserved.