Class YdbRepositoryTransaction<REPO extends YdbRepository>

java.lang.Object
tech.ydb.yoj.repository.ydb.YdbRepositoryTransaction<REPO>
All Implemented Interfaces:
tech.ydb.yoj.repository.BaseDb, tech.ydb.yoj.repository.db.cache.TransactionLocal.Holder, tech.ydb.yoj.repository.db.RepositoryTransaction, YdbTable.QueryExecutor

public class YdbRepositoryTransaction<REPO extends YdbRepository> extends Object implements tech.ydb.yoj.repository.BaseDb, tech.ydb.yoj.repository.db.RepositoryTransaction, YdbTable.QueryExecutor, tech.ydb.yoj.repository.db.cache.TransactionLocal.Holder
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final REPO
     
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    YdbRepositoryTransaction(REPO repo, @NonNull tech.ydb.yoj.repository.db.TxOptions options)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <IN> void
    bulkUpsert(BulkMapper<IN> mapper, List<IN> input, tech.ydb.yoj.repository.db.bulk.BulkParams params)
     
    void
     
    <PARAMS, RESULT>
    List<RESULT>
    execute(Statement<PARAMS,RESULT> statement, PARAMS params)
     
    <PARAMS> void
    pendingExecute(Statement<PARAMS,?> statement, PARAMS value)
     
    <PARAMS, RESULT>
    Stream<RESULT>
    readTable(ReadTableMapper<PARAMS,RESULT> mapper, tech.ydb.yoj.repository.db.readtable.ReadTableParams<PARAMS> params)
     
    void
     
    <T extends tech.ydb.yoj.repository.db.Entity<T>>
    tech.ydb.yoj.repository.db.Table<T>
    table(Class<T> c)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface tech.ydb.yoj.repository.db.RepositoryTransaction

    getOptions, getTransactionLocal

    Methods inherited from interface tech.ydb.yoj.repository.db.cache.TransactionLocal.Holder

    getTransactionLocal

    Methods inherited from interface tech.ydb.yoj.repository.ydb.table.YdbTable.QueryExecutor

    getTransactionLocal
  • Field Details

  • Constructor Details

    • YdbRepositoryTransaction

      public YdbRepositoryTransaction(REPO repo, @NonNull @NonNull tech.ydb.yoj.repository.db.TxOptions options)
  • Method Details

    • table

      public <T extends tech.ydb.yoj.repository.db.Entity<T>> tech.ydb.yoj.repository.db.Table<T> table(Class<T> c)
      Specified by:
      table in interface tech.ydb.yoj.repository.BaseDb
      Specified by:
      table in interface tech.ydb.yoj.repository.db.RepositoryTransaction
    • commit

      public void commit()
      Specified by:
      commit in interface tech.ydb.yoj.repository.db.RepositoryTransaction
    • rollback

      public void rollback()
      Specified by:
      rollback in interface tech.ydb.yoj.repository.db.RepositoryTransaction
    • execute

      public <PARAMS, RESULT> List<RESULT> execute(Statement<PARAMS,RESULT> statement, PARAMS params)
      Specified by:
      execute in interface YdbTable.QueryExecutor
    • pendingExecute

      public <PARAMS> void pendingExecute(Statement<PARAMS,?> statement, PARAMS value)
      Specified by:
      pendingExecute in interface YdbTable.QueryExecutor
    • bulkUpsert

      public <IN> void bulkUpsert(BulkMapper<IN> mapper, List<IN> input, tech.ydb.yoj.repository.db.bulk.BulkParams params)
      Specified by:
      bulkUpsert in interface YdbTable.QueryExecutor
    • readTable

      public <PARAMS, RESULT> Stream<RESULT> readTable(ReadTableMapper<PARAMS,RESULT> mapper, tech.ydb.yoj.repository.db.readtable.ReadTableParams<PARAMS> params) throws tech.ydb.yoj.repository.db.exception.RepositoryException
      Specified by:
      readTable in interface YdbTable.QueryExecutor
      Throws:
      tech.ydb.yoj.repository.db.exception.RepositoryException