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

Remove default methods from BaseDb and RepositoryTransaction for back… #114

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions repository/src/main/java/tech/ydb/yoj/repository/BaseDb.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package tech.ydb.yoj.repository;

import tech.ydb.yoj.repository.db.Entity;
import tech.ydb.yoj.repository.db.EntitySchema;
import tech.ydb.yoj.repository.db.Table;
import tech.ydb.yoj.repository.db.TableDescriptor;
import tech.ydb.yoj.repository.db.Tx;
Expand All @@ -12,9 +11,7 @@ static <T> T current(Class<T> type) {
return Proxies.proxy(type, () -> Tx.Current.get().getRepositoryTransaction());
}

default <T extends Entity<T>> Table<T> table(Class<T> c) {
return table(TableDescriptor.from(EntitySchema.of(c)));
}
<T extends Entity<T>> Table<T> table(Class<T> c);

<T extends Entity<T>> Table<T> table(TableDescriptor<T> tableDescriptor);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
* one call to either method) lest your transaction stays active on the DB server.
*/
public interface RepositoryTransaction {
default <T extends Entity<T>> Table<T> table(Class<T> c) {
return table(TableDescriptor.from(EntitySchema.of(c)));
}
<T extends Entity<T>> Table<T> table(Class<T> c);

<T extends Entity<T>> Table<T> table(TableDescriptor<T> tableDescriptor);

Expand Down
Loading