Releases: ydb-platform/yoj-project
Releases · ydb-platform/yoj-project
YOJ 2.2.6 (meta-annotations)
- #50: Meta-annotation support for
@Column
and@CustomValueType
annotations: you can define annotations that define column mapping or type mapping.
E.g., a@StringColumn UUID myColumn
in an entity is equivalent to@Column(customValueType=@CustomValueType(columnClass=String.class, converter=StringValueConverter.class)) UUID myColumn
.
Same is possible for annotating types with predefined@CustomValueType
annotation, see e.g.@StringValueType
. - #51: Fix conversion errors for custom value types (#24 (comment))
YOJ v2.2.5 (minor bugfix)
#47: YdbSchemaCompatibilityChecker
bugfix on SCHEMA_ERROR
YOJ 2.2.4 (minor improvements)
#46: YdbSchemaCompatibilityChecker
no longer fails if it the path to the table does not exist
YOJ 2.2.3 (Remove unneeded rollbacks)
- #41: Do not attempt a
rollback()
if YDB has already rolled back the transaction
YOJ 2.2.2 (More spliterator fixes)
YOJ 2.2.1 (readTable Spliterator fixes)
YOJ 2.2.0 (Custom Converters)
- #21, #24: Custom converters (experimental feature)
See@CustomValueType
,ValueConverter
andStringValueConverter
for more information. - #36 Add warning about using legacy YOJ type mapping for YDB
- In new projects, call
YqlPrimitiveType.useRecommendedMappingFor(STRING, ENUM, TIMESTAMP)
before using YOJ to opt into using the new recommended mapping instead.
Recommended mapping will become the default in YOJ 3.x. - In old projects, call
YqlPrimitiveType.useLegacyMappingFor(STRING, ENUM, TIMESTAMP)
before using YOJ to explicitly use the legacy mapping.
Legacy mapping will stop being the default in YOJ 3.x. - See detailed decision tree for both new and old projects: #20 (comment)
- In new projects, call
- #34 Remove legacy in-memory repository implementation
YOJ 2.1.0 (Default Mapping Improvements)
- Add explicit annotation for experimental and/or unstable APIs (
@ExperimentalApi
)
Experimental APIs can go away or change incompatibly in any release. - Java<->YDB mapping improvements in
yoj-repository-ydb-v2
(not backported toyoj-repository-ydb-v1
)- #20: Allow better mapping defaults for
String
andInstant
Java types
UseYqlPrimitiveType.useRecommendedMappingFor(STRING, ENUM, TIMESTAMP)
in all new projects.
This new "recommended mapping" will eventually become the default. - #20: Map
Duration
->INTERVAL
YDB column by default, no@Column
annotation required
- #20: Allow better mapping defaults for
- Minor API improvements in
yoj-repository-ydb-v2
:- BREAKING(severity=low): Remove unused
YqlUtils
class - Deprecate
YqlType.of()
andYqlPrimitiveType.of()
for removal fromyoj-repository-ydb-v2
- BREAKING(severity=low): Remove unused
YOJ 2.0.0 (DbType API Change)
BREAKING CHANGE: DbType
DbType
is now an enum, not an interface withString
constants for YDB column data types.
It is also in a different package and a different module than before:tech.ydb.yoj.repository.ydb
→tech.ydb.yoj.databind
,yoj-repository-ydb-common
→yoj-databind
.@Column
annotation uses the updatedDbType
for itsdbType
parameter, not aString
value.- This is a semi-source-compatible change: constant names have not been changed, so you adjusting your dependencies and change the package in your
import
s is probably enough.
If you usedDbType
constants' string values outside of the@Column(dbType=...)
annotation, you will now need to explicitly callDbType.typeString()
to get enum constant as aString
.
YOJ 1.1.3 (minor improvements)
- #17 Allow to use byte array as Entity ID component, if it is represented by a YOJ
ByteArray
type - #18 Support all YDB options for CDC (Change Data Capture) in
@Changefeed
Entity annotation - #25 Allow to use classes with single-argument
String
constructor as "string-value types" (constructed bystatic fromString(String)
,static valueOf(String)
or String-argument constructor; written to the database as text usingtoString()
).