Package tech.ydb.yoj.repository.ydb.yql
Class YqlPrimitiveType
java.lang.Object
tech.ydb.yoj.repository.ydb.yql.YqlPrimitiveType
- All Implemented Interfaces:
YqlType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated, for removal: This API element is subject to removal in a future version.This method will be removed in YOJ 3.0.0.fromYql(tech.ydb.proto.ValueProtos.Value value) tech.ydb.proto.ValueProtos.Type.Builderstatic @NonNull YqlPrimitiveTypeDeprecated, for removal: This API element is subject to removal in a future version.This method will be removed in YOJ 3.0.0.static @NonNull YqlPrimitiveTypeof(Schema.JavaField column) Returns the Yql type of the column.static voidDeprecated, for removal: This API element is subject to removal in a future version.This method has a misleading name and will be removed in YOJ 3.0.0.tech.ydb.proto.ValueProtos.Value.Builderstatic voiduseLegacyMappingFor(FieldValueType... fieldValueTypes) Deprecated.We STRONGLY advise against using the legacy mapping in new projects.static voiduseRecommendedMappingFor(FieldValueType... fieldValueTypes) Uses the recommended field value type ↔ YDB column type mapping for the specified field value type(s).
-
Constructor Details
-
YqlPrimitiveType
public YqlPrimitiveType()
-
-
Method Details
-
changeStringDefaultTypeToUtf8
Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in YOJ 3.0.0. CalluseNewMappingFor(STRING, ENUM)instead. -
resetStringDefaultTypeToDefaults
Deprecated, for removal: This API element is subject to removal in a future version.This method has a misleading name and will be removed in YOJ 3.0.0. CalluseLegacyMappingFor(STRING, ENUM)instead. -
useLegacyMappingFor
Deprecated.We STRONGLY advise against using the legacy mapping in new projects. Please calluseNewMappingFor(STRING, ENUM, TIMESTAMP)instead, and annotate custom-mapped columns with@Columnwhere a different mapping is desired.Uses the legacy (YOJ 1.0.x) field value type ↔ YDB column type mapping for the specified field value type(s). If you need to support legacy applications, calluseLegacyMappingFor(STRING, ENUM, TIMESTAMP)before using any YOJ features.- Parameters:
fieldValueTypes- field value types to use legacy mapping for
-
useRecommendedMappingFor
Uses the recommended field value type ↔ YDB column type mapping for the specified field value type(s).In new projects, we STRONGLY advise that you call
useNewMappingFor(STRING, ENUM, TIMESTAMP)before using any YOJ features. This will eventually become the default mapping, and the call will become a no-op and mighe even be removed.- Parameters:
fieldValueTypes- field value types to use the new mapping for
-
of
Deprecated, for removal: This API element is subject to removal in a future version.This method will be removed in YOJ 3.0.0. Nothing in YOJ callsYqlPrimitiveType.of(Type)any more.Please use
YqlPrimitiveType.of(JavaField)because it correcly respects the customizations specified in the@Columnand@CustomValueTypeannotations. -
of
Returns the Yql type of the column.If the
Columnannotation is specified for thecolumnfield, the annotation fielddbTypemay be used to specify the column type.- Returns:
- the Yql type of the column
-
getYqlTypeName
- Specified by:
getYqlTypeNamein interfaceYqlType
-
getYqlTypeBuilder
public tech.ydb.proto.ValueProtos.Type.Builder getYqlTypeBuilder()- Specified by:
getYqlTypeBuilderin interfaceYqlType
-
toYql
-
fromYql
-