- Alle implementierten Schnittstellen:
Serializable
,DataType<T>
,Named
,QueryPart
,QueryPartInternal
- Bekannte direkte Unterklassen:
BuiltInDataType
This also acts as a static data type registry for jOOQ internally.
This type is for JOOQ INTERNAL USE only. Do not reference directly
- Autor:
- Lukas Eder
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDefaultDataType
(SQLDialect dialect, Class<T> type, String typeName) DefaultDataType
(SQLDialect dialect, Class<T> type, String typeName, String castTypeName) DefaultDataType
(SQLDialect dialect, DataType<T> sqlDataType, String typeName) DefaultDataType
(SQLDialect dialect, DataType<T> sqlDataType, String typeName, String castTypeName) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal Name
$name()
Experimental query object model accessor method, see alsoQOM
.final void
<U> DataType<U>
asConvertedDataType
(Binding<? super T, U> newBinding) Retrieve the data type for a given binding.<U> DataType<U>
asConvertedDataType
(Converter<? super T, U> converter) Retrieve the data type for a given converter.asEnumDataType
(Class<E> enumDataType) Retrieve the data type for a given enum data type.final CharacterSet
Get the character set of this data type, ornull
if there is no character set, or if the default character set applies.Return a new data type like this, with a new character set.Clause[]
Veraltet.- 3.11.0 - [#8179] - This functionality will be removed in the future.final Collation
Get the collation of this data type, ornull
if there is no collation, or if the default collation applies.Return a new data type like this, with a new collation.final boolean
computed()
Whether this column is computed.final boolean
Whether this column is computed on the client.final boolean
Whether this column is computed on the client.final boolean
computedOnClientStoredOn
(GeneratorStatementType statementType) Whether this column is computed on the client.final boolean
Whether this column is computed on the client.final boolean
Whether this column is computed on the server.Convert an arbitrary object into<T>
.final T[]
Convert an arbitrary set of objects into<T>
.convert
(Collection<?> objects) Convert an arbitrary set of objects into<T>
.protected final DSLContext
create()
Veraltet.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.protected final DSLContext
create
(Configuration configuration) Veraltet.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.protected final DSLContext
Veraltet.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.boolean
Subclasses may override thisboolean
Subclasses may override thisboolean
Subclasses may override thisboolean
Subclasses may override thisdefault_()
The expression to be applied as theDEFAULT
value for this data type.Specify an expression to be applied as theDEFAULT
value for this data type.Specify an expression to be applied as theDEFAULT
value for this data type.final boolean
Get the defaultability of this data type.defaulted
(boolean d) Veraltet.The expression to be applied as theDEFAULT
value for this data type.defaultValue
(Field<T> d) Specify an expression to be applied as theDEFAULT
value for this data type.defaultValue
(T d) Specify an expression to be applied as theDEFAULT
value for this data type.boolean
Check whether thisQueryPart
can be considered equal to anotherQueryPart
.Get the computed column expression of this data type, if any.generatedAlwaysAs
(Field<T> generatedAlwaysAsValue) Set the computed column expression of this data type to a constant expression.generatedAlwaysAs
(Generator<?, ?, T> g) Set the computed column expression of this data type to a dynamic expression.Set the computed column expression of this data type to a constant value.Get the computed column expression of this data type, if any.boolean
Subclasses may override thisfinal QOM.GenerationLocation
Get theQOM.GenerationLocation
of the computed column expression of this data type, if any.Set theDataType.generationLocation()
of the computed column expression.final QOM.GenerationOption
Get theQOM.GenerationOption
of the computed column expression of this data type, if any.Set theDataType.generationOption()
of the computed column expression.DataType<?>
Retrieve the Java component data type if this is an ARRAY type, ornull
, otherwise.Class<?>
Retrieve the Java component type if this is an ARRAY type, ornull
, otherwise.Retrieve the data type for an ARRAY of this data type.Retrieve the Java type associated with ARRAYs of this data type.Get the data type binding associated with this data type.Retrieve the dialect-specific type name associated with this data type used for casting.getCastTypeName
(Configuration configuration) Retrieve the dialect-specific type name associated with this data type used for casting.final String
The comment on this object.final Comment
The comment on this object as aQueryPart
.Get the converter associated with this data type.getDataType
(Configuration configuration) The dialect-specific data type representing this data type.static final DataType<?>
getDataType
(SQLDialect dialect, int sqlType) static final <T> DataType<T>
getDataType
(SQLDialect dialect, Class<T> type) static final <T> DataType<T>
getDataType
(SQLDialect dialect, Class<T> type, DataType<T> fallbackDataType) static final DataType<?>
getDataType
(SQLDialect dialect, String typeName) static final DataType<?>
getDataType
(SQLDialect dialect, String t, int p, int s) Convert a type name (using precision and scale) into a Java classstatic final DataType<?>
getDataType
(SQLDialect dialect, String t, int p, int s, boolean forceIntegerTypesOnZeroScaleDecimals) Convert a type name (using precision and scale) into a Java classstatic final DataType<?>
getDataType
(SQLDialect dialect, SQLType sqlType) getDefaultDataType
(String typeName) getDefaultDataType
(SQLDialect dialect, String typeName) final SQLDialect
Retrieve the underlyingSQLDialect
.Get the defining DOMAIN type orNULL
if there is no such type.final String
getName()
The unqualified name of this object.The qualified name of this object.Get the nested record's record type definition, if this is aDataType.isRecord()
, or aDataType.isMultiset()
, orNULL
otherwise.getRow()
Get the nested record'sRow
definition, if this is aDataType.isRecord()
, or aDataType.isMultiset()
, orNULL
otherwise.Get the standard SQL data type of this (dialect-specific) data type if available.int
Get JDBCTypes
value.final int
getSQLType
(Configuration configuration) Get the dialect-specific JDBCTypes
value.getType()
Retrieve the Java type associated with this data type.static final Class<?>
getType
(SQLDialect dialect, String t, int p, int s) Convert a type name (using precision and scale) into a Java classRetrieve the dialect-specific type name associated with this data type.getTypeName
(Configuration configuration) Retrieve the dialect-specific type name associated with this data type.final Name
The unqualified name of this object.int
hashCode()
Generate a hash code from thisQueryPart
.final boolean
Whether this data type has a length.final boolean
Whether this data type has a precision.final boolean
hasScale()
Whether this data type has a scale.final boolean
identity()
Get the identity flag of this data type.identity
(boolean i) Return a new data type like this, with a new identity flag.final boolean
isArray()
Whether this data type is an array type.final boolean
Whether this data type is an array type.final boolean
isBinary()
Whether this data type is any binary type.final boolean
isDate()
Whether this data type is any date type.final boolean
Whether this data type is any date or time type.final boolean
Whether this data type is an embeddable type.final boolean
isEnum()
Whether this data type is an enum type.final boolean
Whether this data type is any integer data type.final boolean
Whether this data type is any interval type.final boolean
isJSON()
Whether this data type is a JSON type.final boolean
isLob()
Whether this data type is best deserialised as aLOB
.boolean
Whether this data type is a nested collection type.final boolean
Whether this data type is any national character data type.final boolean
Whether this data type is any numeric data type.boolean
isRecord()
Whether this data type is a nested record type.final boolean
Whether this data type is a spatial type.final boolean
isString()
Whether this data type is any character data type.final boolean
Whether this data type is any date or time type.final boolean
isTime()
Whether this data type is any time type.final boolean
Whether this data type is any timestamp type.final boolean
isUDT()
Whether this data type is a UDT type.final boolean
isXML()
Whether this data type is an XML type.final int
length()
Get the length of this data type.length
(int l) Return a new data type like this, with a new length value.final boolean
Whether the precision returned byDataType.length()
is defined.static final String
notNull()
Synonym forDataType.nullable(boolean)
, passingfalse
as an argument.null_()
Synonym forDataType.nullable(boolean)
, passingtrue
as an argument.final Nullability
Get the nullability of this data type.Return a new data type like this, with a new nullability.final boolean
nullable()
Get the nullability of this data type.nullable
(boolean n) Return a new data type like this, with a new nullability.final int
Get the precision of this data type.precision
(int p) Return a new data type like this, with a new precision value.precision
(int p, int s) Return a new data type like this, with a new precision and scale value.final boolean
Whether the precision returned byDataType.precision()
is defined.final boolean
readonly()
Get the readonly attribute of this data type.readonly
(boolean r) Return a new data type like this, with a new readonly attribute.final boolean
Get the readonly attribute of this data type, combined with other flags that influence readonly behaviour.boolean
rendersContent
(Context<?> ctx) Subclasses may override thisfinal int
scale()
Get the scale of this data type.scale
(int s) Return a new data type like this, with a new scale value.final boolean
Whether the precision returned byDataType.scale()
is defined.stored()
Set theDataType.generationOption()
of the computed column expression toQOM.GenerationOption.STORED
.toString()
Render a SQL string representation of thisQueryPart
.protected final DataAccessException
translate
(String sql, SQLException e) Internal convenience methodvirtual()
Set theDataType.generationOption()
of the computed column expression toQOM.GenerationOption.VIRTUAL
.Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden org.jooq.DataType
asConvertedDataType, asConvertedDataTypeFrom, asConvertedDataTypeFrom, asConvertedDataTypeTo, asConvertedDataTypeTo
Von Schnittstelle geerbte Methoden org.jooq.Named
$name, getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
Konstruktordetails
-
DefaultDataType
-
DefaultDataType
public DefaultDataType(SQLDialect dialect, DataType<T> sqlDataType, String typeName, String castTypeName) -
DefaultDataType
-
DefaultDataType
-
-
Methodendetails
-
nullability
Beschreibung aus Schnittstelle kopiert:DataType
Get the nullability of this data type.- Gibt zurück:
- The nullability
-
readonly
public final boolean readonly()Beschreibung aus Schnittstelle kopiert:DataType
Get the readonly attribute of this data type.This feature is implemented in commercial distributions only.
-
generatedAlwaysAsGenerator
Beschreibung aus Schnittstelle kopiert:DataType
Get the computed column expression of this data type, if any.This feature is implemented in commercial distributions only.
- Angegeben von:
generatedAlwaysAsGenerator
in SchnittstelleDataType<T>
-
generationOption
Beschreibung aus Schnittstelle kopiert:DataType
Get theQOM.GenerationOption
of the computed column expression of this data type, if any.This feature is implemented in commercial distributions only.
- Angegeben von:
generationOption
in SchnittstelleDataType<T>
-
generationLocation
Beschreibung aus Schnittstelle kopiert:DataType
Get theQOM.GenerationLocation
of the computed column expression of this data type, if any.Specifies whether the
DataType.generatedAlwaysAs()
expression is computed on theQOM.GenerationLocation.SERVER
(by default) or in theQOM.GenerationLocation.CLIENT
. The latter is supported in all dialects, the former only in relevant dialects.The computation happens in
Insert
,Update
, orMerge
statements in caseDataType.generationOption()
isQOM.GenerationOption.STORED
, or inSelect
in case theDataType.generationOption()
isQOM.GenerationOption.VIRTUAL
.This feature is implemented in commercial distributions only.
- Angegeben von:
generationLocation
in SchnittstelleDataType<T>
-
collation
Beschreibung aus Schnittstelle kopiert:DataType
Get the collation of this data type, ornull
if there is no collation, or if the default collation applies. -
characterSet
Beschreibung aus Schnittstelle kopiert:DataType
Get the character set of this data type, ornull
if there is no character set, or if the default character set applies. -
identity
public final boolean identity()Beschreibung aus Schnittstelle kopiert:DataType
Get the identity flag of this data type.- Gibt zurück:
- The identity flag.
-
default_
Beschreibung aus Schnittstelle kopiert:DataType
The expression to be applied as theDEFAULT
value for this data type.- Gibt zurück:
- The default value if present, or
null
if no default value is specified for this data type. - Siehe auch:
-
getSQLDataType
Beschreibung aus Schnittstelle kopiert:DataType
Get the standard SQL data type of this (dialect-specific) data type if available. -
getDataType
Beschreibung aus Schnittstelle kopiert:DataType
The dialect-specific data type representing this data type. -
getType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the Java type associated with this data type. -
getBinding
Beschreibung aus Schnittstelle kopiert:DataType
Get the data type binding associated with this data type. -
getDialect
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the underlyingSQLDialect
. -
getDefaultDataType
-
getDefaultDataType
-
getDataType
-
getDataType
-
getDataType
-
getDataType
-
getDataType
public static final <T> DataType<T> getDataType(SQLDialect dialect, Class<T> type, DataType<T> fallbackDataType) -
normalise
- Gibt zurück:
- The type name without all special characters and white spaces
-
getDataType
public static final DataType<?> getDataType(SQLDialect dialect, String t, int p, int s) throws SQLDialectNotSupportedException Convert a type name (using precision and scale) into a Java class- Löst aus:
SQLDialectNotSupportedException
-
getDataType
public static final DataType<?> getDataType(SQLDialect dialect, String t, int p, int s, boolean forceIntegerTypesOnZeroScaleDecimals) throws SQLDialectNotSupportedException Convert a type name (using precision and scale) into a Java class- Löst aus:
SQLDialectNotSupportedException
-
getType
public static final Class<?> getType(SQLDialect dialect, String t, int p, int s) throws SQLDialectNotSupportedException Convert a type name (using precision and scale) into a Java class- Löst aus:
SQLDialectNotSupportedException
-
nullability
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new nullability.[#5709] A
nullable
column cannot have anDataType.identity()
.- Angegeben von:
nullability
in SchnittstelleDataType<T>
- Parameter:
n
- The new nullability- Gibt zurück:
- The new data type
-
readonly
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new readonly attribute.This feature is implemented in commercial distributions only.
-
generatedAlwaysAs
Beschreibung aus Schnittstelle kopiert:DataType
Set the computed column expression of this data type to a dynamic expression.Unlike
DataType.generatedAlwaysAs(Object)
andDataType.generatedAlwaysAs(Field)
, which produce a constant value or expression, this allows for generating a dynamic expression if used along withDataType.generationLocation()
andQOM.GenerationLocation.CLIENT
, in order to implement client side computed columns.If
DataType.generationLocation()
isQOM.GenerationLocation.SERVER
, then this does not affect generated DML statements, and will be evaluated only in DDL statements, when creating the table.This implicitly sets
DataType.readonly()
totrue
.This feature is implemented in commercial distributions only.
- Angegeben von:
generatedAlwaysAs
in SchnittstelleDataType<T>
-
generationOption
Beschreibung aus Schnittstelle kopiert:DataType
Set theDataType.generationOption()
of the computed column expression.If not supported by the dialect, this will be ignored.
This feature is implemented in commercial distributions only.
- Angegeben von:
generationOption
in SchnittstelleDataType<T>
-
generationLocation
Beschreibung aus Schnittstelle kopiert:DataType
Set theDataType.generationLocation()
of the computed column expression.Specifies whether the
DataType.generatedAlwaysAs()
expression is computed on theQOM.GenerationLocation.SERVER
(by default) or in theQOM.GenerationLocation.CLIENT
. The latter is supported in all dialects, the former only in relevant dialects.The computation happens in
Insert
,Update
, orMerge
statements in caseDataType.generationOption()
isQOM.GenerationOption.STORED
, or inSelect
in case theDataType.generationOption()
isQOM.GenerationOption.VIRTUAL
.This feature is implemented in commercial distributions only.
- Angegeben von:
generationLocation
in SchnittstelleDataType<T>
-
collation
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new collation. -
characterSet
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new character set.- Angegeben von:
characterSet
in SchnittstelleDataType<T>
-
identity
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new identity flag.[#5709] The IDENTITY flag imposes a NOT NULL constraint, and removes all DEFAULT values.
-
default_
Beschreibung aus Schnittstelle kopiert:DataType
Specify an expression to be applied as theDEFAULT
value for this data type.A default value of a data type applies to DDL statements, such as
CREATE TABLE
ALTER TABLE
The distinct types of possible
DEFAULT
expressions is defined by the underlying database. Please refer to your database manual to learn what expressions are possible. -
nullable
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new nullability.This is the same as calling
DataType.nullability(Nullability)
with any ofNullability.NULL
orNullability.NOT_NULL
as an argument.[#5709] A
nullable
column cannot have anDataType.identity()
. -
nullable
public final boolean nullable()Beschreibung aus Schnittstelle kopiert:DataType
Get the nullability of this data type.This returns
true
by default, i.e. ifDataType.nullability()
isNullability.DEFAULT
. -
null_
Beschreibung aus Schnittstelle kopiert:DataType
Synonym forDataType.nullable(boolean)
, passingtrue
as an argument. -
notNull
Beschreibung aus Schnittstelle kopiert:DataType
Synonym forDataType.nullable(boolean)
, passingfalse
as an argument. -
readonlyInternal
public final boolean readonlyInternal()Beschreibung aus Schnittstelle kopiert:DataType
Get the readonly attribute of this data type, combined with other flags that influence readonly behaviour.A column may be marked as
DataType.readonly()
for various reasons, including:- When it is marked as readonly explicitly by the code generator.
- When it is marked as readonly implicitly because it's a computed
column with
QOM.GenerationLocation.SERVER
or withQOM.GenerationLocation.CLIENT
andQOM.GenerationOption.VIRTUAL
.
Some columns are readonly for users, meaning users of the jOOQ API cannot write to them, but jOOQ, internally, may still write to those columns. Such columns may include:
- Columns that are computed with
QOM.GenerationLocation.CLIENT
andQOM.GenerationOption.STORED
- Columns used for optimistic locking
This feature is implemented in commercial distributions only.
- Angegeben von:
readonlyInternal
in SchnittstelleDataType<T>
-
computed
public final boolean computed()Beschreibung aus Schnittstelle kopiert:DataType
Whether this column is computed.This feature is implemented in commercial distributions only.
-
computedOnServer
public final boolean computedOnServer()Beschreibung aus Schnittstelle kopiert:DataType
Whether this column is computed on the server.This is true only if all of these hold true:
This feature is implemented in commercial distributions only.
- Angegeben von:
computedOnServer
in SchnittstelleDataType<T>
-
computedOnClient
public final boolean computedOnClient()Beschreibung aus Schnittstelle kopiert:DataType
Whether this column is computed on the client.This is true only if all of these hold true:
This feature is implemented in commercial distributions only.
- Angegeben von:
computedOnClient
in SchnittstelleDataType<T>
-
computedOnClientStored
public final boolean computedOnClientStored()Beschreibung aus Schnittstelle kopiert:DataType
Whether this column is computed on the client.This is true only if all of these hold true:
DataType.computed()
DataType.generationLocation()
==QOM.GenerationLocation.CLIENT
DataType.generationOption()
==QOM.GenerationOption.STORED
DataType.generatedAlwaysAsGenerator()
produces a generator thatGenerator.supports(GeneratorStatementType)
any ofGeneratorStatementType.INSERT
orGeneratorStatementType.UPDATE
This feature is implemented in commercial distributions only.
- Angegeben von:
computedOnClientStored
in SchnittstelleDataType<T>
-
computedOnClientStoredOn
Beschreibung aus Schnittstelle kopiert:DataType
Whether this column is computed on the client.This is true only if all of these hold true:
DataType.computed()
DataType.generationLocation()
==QOM.GenerationLocation.CLIENT
DataType.generationOption()
==QOM.GenerationOption.STORED
DataType.generatedAlwaysAsGenerator()
produces a generator thatGenerator.supports(GeneratorStatementType)
the argumentstatementType
This feature is implemented in commercial distributions only.
- Angegeben von:
computedOnClientStoredOn
in SchnittstelleDataType<T>
-
computedOnClientVirtual
public final boolean computedOnClientVirtual()Beschreibung aus Schnittstelle kopiert:DataType
Whether this column is computed on the client.This is true only if all of these hold true:
DataType.computed()
DataType.generationLocation()
==QOM.GenerationLocation.CLIENT
DataType.generationOption()
==QOM.GenerationOption.VIRTUAL
DataType.generatedAlwaysAsGenerator()
produces a generator thatGenerator.supports(GeneratorStatementType)
the typeGeneratorStatementType.SELECT
This feature is implemented in commercial distributions only.
- Angegeben von:
computedOnClientVirtual
in SchnittstelleDataType<T>
-
generatedAlwaysAs
Beschreibung aus Schnittstelle kopiert:DataType
Set the computed column expression of this data type to a constant value.This implicitly sets
DataType.readonly()
totrue
.This feature is implemented in commercial distributions only.
- Angegeben von:
generatedAlwaysAs
in SchnittstelleDataType<T>
-
generatedAlwaysAs
Beschreibung aus Schnittstelle kopiert:DataType
Set the computed column expression of this data type to a constant expression.This implicitly sets
DataType.readonly()
totrue
.This feature is implemented in commercial distributions only.
- Angegeben von:
generatedAlwaysAs
in SchnittstelleDataType<T>
-
generatedAlwaysAs
Beschreibung aus Schnittstelle kopiert:DataType
Get the computed column expression of this data type, if any.This eagerly evaluates the
DataType.generatedAlwaysAsGenerator()
generator, which may not produce the same expression upon execution of a query, in caseDataType.generationLocation()
isQOM.GenerationLocation.CLIENT
. The behaviour ofQOM.GenerationLocation.SERVER
is not affected. The method has been left unmodified for backwards compatibility with jOOQ 3.16.This feature is implemented in commercial distributions only.
- Angegeben von:
generatedAlwaysAs
in SchnittstelleDataType<T>
-
stored
Beschreibung aus Schnittstelle kopiert:DataType
Set theDataType.generationOption()
of the computed column expression toQOM.GenerationOption.STORED
.If not supported by the dialect, this will be ignored.
This feature is implemented in commercial distributions only.
-
virtual
Beschreibung aus Schnittstelle kopiert:DataType
Set theDataType.generationOption()
of the computed column expression toQOM.GenerationOption.VIRTUAL
.If not supported by the dialect, this will be ignored.
This feature is implemented in commercial distributions only.
-
defaultValue
Beschreibung aus Schnittstelle kopiert:DataType
Specify an expression to be applied as theDEFAULT
value for this data type.[#5709] A
defaulted
column cannot have anDataType.identity()
.This is an alias for
DataType.default_(Object)
.- Angegeben von:
defaultValue
in SchnittstelleDataType<T>
- Siehe auch:
-
defaultValue
Beschreibung aus Schnittstelle kopiert:DataType
Specify an expression to be applied as theDEFAULT
value for this data type.A default value of a data type applies to DDL statements, such as
CREATE TABLE
ALTER TABLE
The distinct types of possible
DEFAULT
expressions is defined by the underlying database. Please refer to your database manual to learn what expressions are possible.This is an alias for
DataType.default_(Field)
.- Angegeben von:
defaultValue
in SchnittstelleDataType<T>
-
defaultValue
Beschreibung aus Schnittstelle kopiert:DataType
The expression to be applied as theDEFAULT
value for this data type.This is an alias for
DataType.default_()
.- Angegeben von:
defaultValue
in SchnittstelleDataType<T>
- Gibt zurück:
- The default value if present, or
null
if no default value is specified for this data type. - Siehe auch:
-
default_
Beschreibung aus Schnittstelle kopiert:DataType
Specify an expression to be applied as theDEFAULT
value for this data type.[#5709] A
defaulted
column cannot have anDataType.identity()
. -
defaulted
Veraltet.Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new defaultability. -
defaulted
public final boolean defaulted()Beschreibung aus Schnittstelle kopiert:DataType
Get the defaultability of this data type. -
precision
public final int precision()Beschreibung aus Schnittstelle kopiert:DataType
Get the precision of this data type. -
precision
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new precision value.This will have no effect if
DataType.hasPrecision()
isfalse
This is the same as calling
DataType.precision(int, int)
withscale == 0
-
precision
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new precision and scale value.This will have no effect if
DataType.hasPrecision()
isfalse
, or ifscale > 0
andDataType.hasScale()
isfalse
-
hasPrecision
public final boolean hasPrecision()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type has a precision.- Angegeben von:
hasPrecision
in SchnittstelleDataType<T>
- Gibt zurück:
- Whether this data type has a precision
-
precisionDefined
public final boolean precisionDefined()Beschreibung aus Schnittstelle kopiert:DataType
Whether the precision returned byDataType.precision()
is defined.The default precision is
0
for all data types. If a data type does not have a precision (seeDataType.hasPrecision()
), or if it was initialised without precision (e.g.SQLDataType.TIMESTAMP
), then the precision is not defined.- Angegeben von:
precisionDefined
in SchnittstelleDataType<T>
-
scale
public final int scale()Beschreibung aus Schnittstelle kopiert:DataType
Get the scale of this data type. -
scale
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new scale value.This will have no effect if
DataType.hasScale()
isfalse
-
hasScale
public final boolean hasScale()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type has a scale. -
scaleDefined
public final boolean scaleDefined()Beschreibung aus Schnittstelle kopiert:DataType
Whether the precision returned byDataType.scale()
is defined.The default scale is
0
for all data types. If a data type does not have a scale (seeDataType.hasScale()
), or if it was initialised without scale (e.g.SQLDataType.TIMESTAMP
), then the scale is not defined.- Angegeben von:
scaleDefined
in SchnittstelleDataType<T>
-
length
Beschreibung aus Schnittstelle kopiert:DataType
Return a new data type like this, with a new length value.This will have no effect if
DataType.hasLength()
isfalse
-
length
public final int length()Beschreibung aus Schnittstelle kopiert:DataType
Get the length of this data type. -
hasLength
public final boolean hasLength()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type has a length. -
lengthDefined
public final boolean lengthDefined()Beschreibung aus Schnittstelle kopiert:DataType
Whether the precision returned byDataType.length()
is defined.The default length is
0
for all data types. If a data type does not have a length (seeDataType.hasLength()
), or if it was initialised without length (e.g.SQLDataType.TIMESTAMP
), then the length is not defined.- Angegeben von:
lengthDefined
in SchnittstelleDataType<T>
-
getSQLType
public int getSQLType()Beschreibung aus Schnittstelle kopiert:DataType
Get JDBCTypes
value.- Angegeben von:
getSQLType
in SchnittstelleDataType<T>
-
getSQLType
Beschreibung aus Schnittstelle kopiert:DataType
Get the dialect-specific JDBCTypes
value.- Angegeben von:
getSQLType
in SchnittstelleDataType<T>
-
getDomain
Beschreibung aus Schnittstelle kopiert:DataType
Get the defining DOMAIN type orNULL
if there is no such type. -
getConverter
Beschreibung aus Schnittstelle kopiert:DataType
Get the converter associated with this data type.- Angegeben von:
getConverter
in SchnittstelleDataType<T>
-
getTypeName
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the dialect-specific type name associated with this data type.- Angegeben von:
getTypeName
in SchnittstelleDataType<T>
-
getTypeName
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the dialect-specific type name associated with this data type.- Angegeben von:
getTypeName
in SchnittstelleDataType<T>
-
getCastTypeName
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the dialect-specific type name associated with this data type used for casting.This is useful for some dialects that have specialised type names for cast expressions. Other dialects require type-length binding when casting, (e.g. VARCHAR(32767))
- Angegeben von:
getCastTypeName
in SchnittstelleDataType<T>
-
getCastTypeName
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the dialect-specific type name associated with this data type used for casting.This is useful for some dialects that have specialised type names for cast expressions. Other dialects require type-length binding when casting, (e.g. VARCHAR(32767))
- Angegeben von:
getCastTypeName
in SchnittstelleDataType<T>
-
getArrayType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the Java type associated with ARRAYs of this data type.- Angegeben von:
getArrayType
in SchnittstelleDataType<T>
-
getArrayDataType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the data type for an ARRAY of this data type.Built-in data types, as well as custom data types that have a custom
DataType.getConverter()
can be translated to array data types usingConverter.forArrays()
. Data types with customDataType.getBinding()
cannot be translated to an array data type. Use this idiom, instead:// Doesn't work DataTypeUngültige Eingabe: "<"UserType[]> t1 = SQLDataType.INTEGER.asConvertedDataType(binding).getArrayDataType(); // Works DataTypeUngültige Eingabe: "<"UserType[]> t2 = SQLDataType.INTEGER.getArrayDataType().asConvertedDataType(arrayBinding);
- Angegeben von:
getArrayDataType
in SchnittstelleDataType<T>
-
getArrayComponentType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the Java component type if this is an ARRAY type, ornull
, otherwise.- Angegeben von:
getArrayComponentType
in SchnittstelleDataType<T>
-
getArrayComponentDataType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the Java component data type if this is an ARRAY type, ornull
, otherwise.- Angegeben von:
getArrayComponentDataType
in SchnittstelleDataType<T>
-
getRow
Beschreibung aus Schnittstelle kopiert:DataType
Get the nested record'sRow
definition, if this is aDataType.isRecord()
, or aDataType.isMultiset()
, orNULL
otherwise. -
getRecordType
Beschreibung aus Schnittstelle kopiert:DataType
Get the nested record's record type definition, if this is aDataType.isRecord()
, or aDataType.isMultiset()
, orNULL
otherwise.- Angegeben von:
getRecordType
in SchnittstelleDataType<T>
-
asEnumDataType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the data type for a given enum data type.- Angegeben von:
asEnumDataType
in SchnittstelleDataType<T>
-
asConvertedDataType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the data type for a given converter.- Angegeben von:
asConvertedDataType
in SchnittstelleDataType<T>
-
asConvertedDataType
Beschreibung aus Schnittstelle kopiert:DataType
Retrieve the data type for a given binding.- Angegeben von:
asConvertedDataType
in SchnittstelleDataType<T>
-
convert
Beschreibung aus Schnittstelle kopiert:DataType
Convert an arbitrary object into<T>
.See
ungültiges @link
Convert#convert(Object, Class)
Configuration.converterProvider()
. -
convert
Beschreibung aus Schnittstelle kopiert:DataType
Convert an arbitrary set of objects into<T>
.See
ungültiges @link
Convert#convert(Object, Class)
Configuration.converterProvider()
. -
convert
Beschreibung aus Schnittstelle kopiert:DataType
Convert an arbitrary set of objects into<T>
.See
ungültiges @link
Convert#convert(Object, Class)
Configuration.converterProvider()
. -
isNumeric
public final boolean isNumeric()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any numeric data type.This applies to any of these types:
-
isInteger
public final boolean isInteger()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any integer data type.This applies to any of these types:
-
isString
public final boolean isString()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any character data type.This applies to any of these types:
-
isNString
public final boolean isNString()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any national character data type.This applies to any of these types:
-
isDateTime
public final boolean isDateTime()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any date or time type.This applies to any of these types.
- Angegeben von:
isDateTime
in SchnittstelleDataType<T>
- Siehe auch:
-
isDate
public final boolean isDate()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any date type.This applies to any of these types.
-
isTimestamp
public final boolean isTimestamp()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any timestamp type.This applies to any of these types.
- Angegeben von:
isTimestamp
in SchnittstelleDataType<T>
-
isTime
public final boolean isTime()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any time type.This applies to any of these types.
-
isTemporal
public final boolean isTemporal()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any date or time type.This applies to any of these types.
-
SQLDataType.DATE
-
SQLDataType.TIME
-
SQLDataType.TIMESTAMP
-
SQLDataType.LOCALDATE
-
SQLDataType.LOCALTIME
-
SQLDataType.LOCALDATETIME
-
SQLDataType.OFFSETTIME
-
SQLDataType.OFFSETDATETIME
-
YearToSecond
-
YearToMonth
-
DayToSecond
This is a combination of
DataType.isDateTime()
orDataType.isInterval()
- Angegeben von:
isTemporal
in SchnittstelleDataType<T>
-
-
isInterval
public final boolean isInterval()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any interval type.This applies to any of these types.
- Angegeben von:
isInterval
in SchnittstelleDataType<T>
-
isLob
public final boolean isLob()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is best deserialised as aLOB
.This applies to any of these types.
-
isBinary
public final boolean isBinary()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is any binary type.This applies to any of these types.
-
isArray
public final boolean isArray()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is an array type. -
isAssociativeArray
public final boolean isAssociativeArray()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is an array type.- Angegeben von:
isAssociativeArray
in SchnittstelleDataType<T>
-
isEmbeddable
public final boolean isEmbeddable()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is an embeddable type.- Angegeben von:
isEmbeddable
in SchnittstelleDataType<T>
-
isUDT
public final boolean isUDT()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is a UDT type. -
isRecord
public boolean isRecord()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is a nested record type.This is true for anonymous, structural nested record types constructed with
DSL.row(SelectField...)
or for nominal nested record types, such asDataType.isUDT()
orDataType.isEmbeddable()
. -
isMultiset
public boolean isMultiset()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is a nested collection type.This is true for anonymous, structural nested collection types constructed with
ungültiges @link
DSL#multiset(Select)
DSL.multisetAgg(Field...)
.- Angegeben von:
isMultiset
in SchnittstelleDataType<T>
-
isEnum
public final boolean isEnum()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is an enum type. -
isJSON
public final boolean isJSON()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is a JSON type. -
isXML
public final boolean isXML()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is an XML type. -
isSpatial
public final boolean isSpatial()Beschreibung aus Schnittstelle kopiert:DataType
Whether this data type is a spatial type. -
accept
Beschreibung aus Schnittstelle kopiert:QueryPartInternal
ThisQueryPart
canaccept
aContext
object in order to render a SQL string or to bind its variables.- Angegeben von:
accept
in SchnittstelleQueryPartInternal
-
toString
Beschreibung aus Schnittstelle kopiert:QueryPart
Render a SQL string representation of thisQueryPart
.For improved debugging, this renders a SQL string of this
QueryPart
with inlined bind variables. If thisQueryPart
isAttachable
, then the attachedConfiguration
may be used for rendering the SQL string, includingSQLDialect
andSettings
. Do note that mostQueryPart
instances are not attached to aConfiguration
, and thus there is no guarantee that the SQL string will make sense in the context of a specific database. -
hashCode
public int hashCode()Beschreibung aus Schnittstelle kopiert:QueryPart
Generate a hash code from thisQueryPart
.In general,
QueryPart
hash codes are the same as the hash codes generated fromQueryPart.toString()
. This guarantees consistent behaviour withQueryPart.equals(Object)
Some
QueryPart
implementations may choose to override this behaviour for improved performance, asQueryPart.toString()
is an expensive operation, if called many times. -
equals
Beschreibung aus Schnittstelle kopiert:QueryPart
Check whether thisQueryPart
can be considered equal to anotherQueryPart
.In general,
QueryPart
equality is defined in terms ofQueryPart.toString()
equality. In other words, two query parts are considered equal if their rendered SQL (with inlined bind variables) is equal. This means that the two query parts do not necessarily have to be of the same type.Some
QueryPart
implementations may choose to override this behaviour for improved performance, asQueryPart.toString()
is an expensive operation, if called many times. -
getName
Beschreibung aus Schnittstelle kopiert:Named
The unqualified name of this object. -
getQualifiedName
Beschreibung aus Schnittstelle kopiert:Named
The qualified name of this object.- Angegeben von:
getQualifiedName
in SchnittstelleNamed
-
getUnqualifiedName
Beschreibung aus Schnittstelle kopiert:Named
The unqualified name of this object.- Angegeben von:
getUnqualifiedName
in SchnittstelleNamed
-
getComment
Beschreibung aus Schnittstelle kopiert:Named
The comment on this object.This is the same as calling
Named.getCommentPart()
and thenComment.getComment()
.- Angegeben von:
getComment
in SchnittstelleNamed
-
getCommentPart
Beschreibung aus Schnittstelle kopiert:Named
The comment on this object as aQueryPart
.- Angegeben von:
getCommentPart
in SchnittstelleNamed
-
$name
Beschreibung aus Schnittstelle kopiert:Named
Experimental query object model accessor method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
clauses
Veraltet.- 3.11.0 - [#8179] - This functionality will be removed in the future.Beschreibung aus Schnittstelle kopiert:QueryPartInternal
TheClause
s that are represented by this query part.QueryPart
s can specify severalClause
s for which an event will be emittedbefore
(in forward order) andafter
(in reverse order) visiting the the query part throughContext.visit(QueryPart)
This method is for JOOQ INTERNAL USE only. Do not reference directly
- Angegeben von:
clauses
in SchnittstelleQueryPartInternal
- Gibt zurück:
- The
Clause
s represented by this query part ornull
or an empty array if this query part does not represent a clause.
-
rendersContent
Subclasses may override this- Angegeben von:
rendersContent
in SchnittstelleQueryPartInternal
-
declaresFields
public boolean declaresFields()Subclasses may override this- Angegeben von:
declaresFields
in SchnittstelleQueryPartInternal
-
declaresTables
public boolean declaresTables()Subclasses may override this- Angegeben von:
declaresTables
in SchnittstelleQueryPartInternal
-
declaresWindows
public boolean declaresWindows()Subclasses may override this- Angegeben von:
declaresWindows
in SchnittstelleQueryPartInternal
-
declaresCTE
public boolean declaresCTE()Subclasses may override this- Angegeben von:
declaresCTE
in SchnittstelleQueryPartInternal
-
generatesCast
public boolean generatesCast()Subclasses may override this- Angegeben von:
generatesCast
in SchnittstelleQueryPartInternal
-
create
Veraltet.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.Internal convenience method -
create
Veraltet.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.Internal convenience method -
create
Veraltet.- 3.11.0 - [#6722] - UseAttachable.configuration()
andConfiguration.dsl()
instead.Internal convenience method -
translate
Internal convenience method
-