Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

g-sg-v
Copy link
Contributor

@g-sg-v g-sg-v commented Nov 22, 2024

No description provided.

Copy link
Collaborator

@nvamelichev nvamelichev left a 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/BUILD 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) {
Copy link
Collaborator

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.

@g-sg-v g-sg-v requested a review from lavrukov November 27, 2024 15:28
Copy link
Collaborator

@nvamelichev nvamelichev left a 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 👍

Copy link
Collaborator

@nvamelichev nvamelichev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants