-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query multiple tables using one entity #94
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, this PR needs a little bit of polishing... and explicit @ExperimentalApi
annotations to deter users who don't know the trade-offs of this implementation.
Please also add a basic test of the new functionality to YdbRepositoryIntegrationTest
. To run the integration test, start YDB-in-Docker by running repository-ydb-v2/src/test/script/run-ydb.sh
.
repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/YdbRepositoryTransaction.java
Show resolved
Hide resolved
...2/src/main/java/tech/ydb/yoj/repository/ydb/compatibility/YdbSchemaCompatibilityChecker.java
Show resolved
Hide resolved
repository/src/main/java/tech/ydb/yoj/repository/db/EntityDescriptor.java
Outdated
Show resolved
Hide resolved
private static final AtomicBoolean useOldStatementFactory = new AtomicBoolean(Boolean.getBoolean("yoj.use.type.statement.factory")); | ||
|
||
@Deprecated(forRemoval = true) | ||
public static void setUseOldStatementFactory(boolean value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment for @lavrukov:
If you don't use custom table names, the YqlStatementFactory.Descriptor
statement factory should produce the same YqlStatements
as previous versions of YOJ.
But out of abundance of caution, we added a way to construct YqlStatements
only using entity class, not (entity class [+ optional table name]). To use this legacy YqlStatementFactory
implementation, set a Java property yoj.use.type.statement.factory
to true
or explicitly call YdbTable.setUseOldStatementFactory(true)
before using YOJ.
repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/table/YdbTable.java
Show resolved
Hide resolved
repository/src/main/java/tech/ydb/yoj/repository/db/AbstractDelegatingTable.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/tech/ydb/yoj/repository/db/EntityDescriptor.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/tech/ydb/yoj/repository/db/EntityDescriptor.java
Outdated
Show resolved
Hide resolved
0d20b93
to
4941b71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but several minor fixes requested 👍
repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/table/BatchFindSpliterator.java
Outdated
Show resolved
Hide resolved
repository/src/main/java/tech/ydb/yoj/repository/db/EntityDescriptor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
No description provided.