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>
-
Nested Class Summary
Nested classes/interfaces inherited from interface tech.ydb.yoj.repository.ydb.statement.Statement
Statement.QueryType -
Field Summary
Fields inherited from class tech.ydb.yoj.repository.ydb.statement.YqlStatement
itemsCollector, ORDER_BY_ID_ASCENDING, resultSchema, resultSetReader, schema, tableDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionFindYqlStatement(tech.ydb.yoj.repository.db.TableDescriptor<ENTITY> tableDescriptor, tech.ydb.yoj.repository.db.EntitySchema<ENTITY> schema, Schema<RESULT> resultSchema) -
Method Summary
Modifier and TypeMethodDescriptionReturns parameterized YQL for this query.Returns query type (for query merging purposes).readFromCache(PARAMS params, tech.ydb.yoj.repository.db.cache.RepositoryCache cache) Tries to read the query result from first-level cache.voidstoreToCache(PARAMS params, List<RESULT> result, tech.ydb.yoj.repository.db.cache.RepositoryCache cache) Writes the query result to first-level cache.toDebugString(PARAMS params) Returns debug representation of this query with the specified parameter values.Methods inherited from class tech.ydb.yoj.repository.ydb.statement.YqlStatement
createTQueryParameter, declarations, equals, escape, getDeclaration, getInSchemaType, getYqlType, getYqlValue, hashCode, isPreparable, mergeParts, mergeParts, nameEqVars, outNames, readResult, resolveParamNames, table, toQueryParameters, toString
-
Constructor Details
-
FindYqlStatement
-
-
Method Details
-
getParams
-
getQuery
Description copied from interface:StatementReturns 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:StatementTries to read the query result from first-level cache.- Parameters:
params- parameter values. Might benulldepending on the statement type, e.g. for DELETE statements.cache- first-level cache- Returns:
- query result, if present in first-level cache;
nullotherwise
-
storeToCache
public void storeToCache(PARAMS params, List<RESULT> result, tech.ydb.yoj.repository.db.cache.RepositoryCache cache) Description copied from interface:StatementWrites the query result to first-level cache.- Specified by:
storeToCachein interfaceStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>> - Overrides:
storeToCachein classYqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>, RESULT> - Parameters:
params- parameter values Might benulldepending on the statement type, e.g. for DELETE statements.result- result to save; ifnull, nothing will be saved to cachecache- first-level cache
-
getQueryType
Description copied from interface:StatementReturns query type (for query merging purposes).- Returns:
- query type
-
toDebugString
Description copied from interface:StatementReturns debug representation of this query with the specified parameter values.- Parameters:
params- parameter values. Might benulldepending on the statement type, e.g. for DELETE statements.- Returns:
- debug representation of the query parameterized with
params
-