Class YqlPrimitiveType

java.lang.Object
tech.ydb.yoj.repository.ydb.yql.YqlPrimitiveType
All Implemented Interfaces:
YqlType

public class YqlPrimitiveType extends Object implements YqlType
  • Constructor Details

    • YqlPrimitiveType

      public YqlPrimitiveType()
  • Method Details

    • changeStringDefaultTypeToUtf8

      public static void changeStringDefaultTypeToUtf8()
    • resetStringDefaultTypeToDefaults

      public static void resetStringDefaultTypeToDefaults()
    • of

      @NonNull @Deprecated(forRemoval=true) public static @NonNull YqlPrimitiveType of(Type javaType)
      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 calls YqlPrimitiveType.of(Type) any more.

      Please use YqlPrimitiveType.of(JavaField) because it correcly respects the customizations specified in the @Column and @CustomValueType annotations.

    • of

      @NonNull public static @NonNull YqlPrimitiveType of(tech.ydb.yoj.databind.schema.Schema.JavaField column)
      Returns the Yql type of the column.

      If the Column annotation is specified for the column field, the annotation field dbType may be used to specify the column type.

      Returns:
      the Yql type of the column
    • getYqlTypeName

      public String getYqlTypeName()
      Specified by:
      getYqlTypeName in interface YqlType
    • getYqlTypeBuilder

      public com.yandex.ydb.ValueProtos.Type.Builder getYqlTypeBuilder()
      Specified by:
      getYqlTypeBuilder in interface YqlType
    • toYql

      public com.yandex.ydb.ValueProtos.Value.Builder toYql(Object value)
      Specified by:
      toYql in interface YqlType
    • fromYql

      public Object fromYql(com.yandex.ydb.ValueProtos.Value value)
      Specified by:
      fromYql in interface YqlType