java.lang.Object
io.helidon.dbclient.mongodb.MongoDbColumn
- All Implemented Interfaces:
DbColumn
Mongo specific column data and metadata.
-
Method Summary
Modifier and TypeMethodDescription<T> T
as
(GenericType<T> type) Value of this column as a generic type.<T> T
Typed value of this column.dbType()
Type of the column in the language of the database.Class<?>
javaType()
Type of the column as would be returned by the underlying database driver.name()
Column name.
-
Method Details
-
as
Description copied from interface:DbColumn
Typed value of this column. This method can return a correct result only if the type is the same asDbColumn.javaType()
or there is aMapper
registered that can map it.- Specified by:
as
in interfaceDbColumn
- Type Parameters:
T
- type of the returned value- Parameters:
type
- class of the type that should be returned (must be supported by the underlying data type)- Returns:
- value of this column correctly typed
- Throws:
MapperException
- in case the type is not the underlyingDbColumn.javaType()
and there is no mapper registered for it
-
as
Description copied from interface:DbColumn
Value of this column as a generic type. This method can return a correct result only if the type represents a class, or if there is aMapper
registered that can map underlyingDbColumn.javaType()
to the type requested.- Specified by:
as
in interfaceDbColumn
- Type Parameters:
T
- type of the returned value- Parameters:
type
- requested type- Returns:
- value mapped to the expected type if possible
- Throws:
MapperException
- in case the mapping cannot be done
-
javaType
Description copied from interface:DbColumn
Type of the column as would be returned by the underlying database driver. -
dbType
Description copied from interface:DbColumn
Type of the column in the language of the database.Example for SQL - if a column is declared as
VARCHAR(256)
in the database, this method would returnVARCHAR
and methodDbColumn.javaType()
would returnString
. -
name
Description copied from interface:DbColumn
Column name.
-