tech.ydb.yoj.repository.BaseDb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yoj-repository Show documentation
Show all versions of yoj-repository Show documentation
Core YOJ (YDB ORM for Java) abstractions and APIs for domain entities, repositories, transactions etc.
package tech.ydb.yoj.repository;
import tech.ydb.yoj.repository.db.Entity;
import tech.ydb.yoj.repository.db.Table;
import tech.ydb.yoj.repository.db.Tx;
import tech.ydb.yoj.util.lang.Proxies;
public interface BaseDb {
static T current(Class type) {
return Proxies.proxy(type, () -> Tx.Current.get().getRepositoryTransaction());
}
> Table table(Class c);
}