Class FindYqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>,RESULT>

java.lang.Object
tech.ydb.yoj.repository.ydb.statement.YqlStatement<PARAMS,ENTITY,RESULT>
tech.ydb.yoj.repository.ydb.statement.FindYqlStatement<PARAMS,ENTITY,RESULT>
All Implemented Interfaces:
Statement<PARAMS,RESULT>

public class FindYqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>,RESULT> extends YqlStatement<PARAMS,ENTITY,RESULT>
  • Constructor Details

    • FindYqlStatement

      public FindYqlStatement(tech.ydb.yoj.repository.db.TableDescriptor<ENTITY> tableDescriptor, tech.ydb.yoj.repository.db.EntitySchema<ENTITY> schema, Schema<RESULT> resultSchema)
  • Method Details

    • getParams

      public List<YqlStatementParam> getParams()
      Overrides:
      getParams in class YqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>,RESULT>
    • getQuery

      public String getQuery(String tablespace)
      Description copied from interface: Statement
      Returns parameterized YQL for this query.
      Parameters:
      tablespace - base path for all tables referenced in the query
      Returns:
      YQL
    • readFromCache

      public List<RESULT> readFromCache(PARAMS params, tech.ydb.yoj.repository.db.cache.RepositoryCache cache)
      Description copied from interface: Statement
      Tries to read the query result from first-level cache.
      Parameters:
      params - parameter values. Might be null depending on the statement type, e.g. for DELETE statements.
      cache - first-level cache
      Returns:
      query result, if present in first-level cache; null otherwise
    • storeToCache

      public void storeToCache(PARAMS params, List<RESULT> result, tech.ydb.yoj.repository.db.cache.RepositoryCache cache)
      Description copied from interface: Statement
      Writes the query result to first-level cache.
      Specified by:
      storeToCache in interface Statement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>>
      Overrides:
      storeToCache in class YqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>,RESULT>
      Parameters:
      params - parameter values Might be null depending on the statement type, e.g. for DELETE statements.
      result - result to save; if null, nothing will be saved to cache
      cache - first-level cache
    • getQueryType

      public Statement.QueryType getQueryType()
      Description copied from interface: Statement
      Returns query type (for query merging purposes).
      Returns:
      query type
    • toDebugString

      public String toDebugString(PARAMS params)
      Description copied from interface: Statement
      Returns debug representation of this query with the specified parameter values.
      Parameters:
      params - parameter values. Might be null depending on the statement type, e.g. for DELETE statements.
      Returns:
      debug representation of the query parameterized with params