Class PredicateStatement<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.PredicateStatement<PARAMS,ENTITY,RESULT>
- All Implemented Interfaces:
Statement<PARAMS,RESULT>
- Direct Known Subclasses:
CountAllStatement,FindStatement
public abstract class PredicateStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>,RESULT>
extends YqlStatement<PARAMS,ENTITY,RESULT>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumNested 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
ConstructorsConstructorDescriptionPredicateStatement(@NonNull tech.ydb.yoj.repository.db.EntitySchema<ENTITY> schema, @NonNull Schema<RESULT> outSchema, PARAMS params, @NonNull Function<PARAMS, YqlPredicate> getPredicate) Deprecated, for removal: This API element is subject to removal in a future version.PredicateStatement(@NonNull tech.ydb.yoj.repository.db.TableDescriptor<ENTITY> tableDescriptor, @NonNull tech.ydb.yoj.repository.db.EntitySchema<ENTITY> schema, @NonNull Schema<RESULT> outSchema, PARAMS params, @NonNull Function<PARAMS, YqlPredicate> getPredicate) -
Method Summary
Modifier and TypeMethodDescriptionprotected tech.ydb.proto.ValueProtos.TypedValuecreateTQueryParameter(YqlType yqlType, Object o, boolean optional) protected Stringprotected Collection<YqlStatementParam>protected tech.ydb.proto.ValueProtos.Type.BuildergetYqlType(YqlType yqlType, boolean optional) protected tech.ydb.proto.ValueProtos.Value.BuildergetYqlValue(YqlType type, Object value) toQueryParameters(PARAMS params) Returns the query's parameter values as YDB protobuf structures.Methods inherited from class tech.ydb.yoj.repository.ydb.statement.YqlStatement
equals, escape, getDeclaration, getInSchemaType, hashCode, isPreparable, mergeParts, mergeParts, nameEqVars, outNames, readResult, resolveParamNames, storeToCache, table, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tech.ydb.yoj.repository.ydb.statement.Statement
getQuery, getQueryType, readFromCache, toDebugString
-
Constructor Details
-
PredicateStatement
@Deprecated(forRemoval=true) public PredicateStatement(@NonNull @NonNull tech.ydb.yoj.repository.db.EntitySchema<ENTITY> schema, @NonNull @NonNull Schema<RESULT> outSchema, @NonNull PARAMS params, @NonNull @NonNull Function<PARAMS, YqlPredicate> getPredicate) Deprecated, for removal: This API element is subject to removal in a future version.Use constructor withTableDescriptorfor selecting correct entity table -
PredicateStatement
public PredicateStatement(@NonNull @NonNull tech.ydb.yoj.repository.db.TableDescriptor<ENTITY> tableDescriptor, @NonNull @NonNull tech.ydb.yoj.repository.db.EntitySchema<ENTITY> schema, @NonNull @NonNull Schema<RESULT> outSchema, @NonNull PARAMS params, @NonNull @NonNull Function<PARAMS, YqlPredicate> getPredicate)
-
-
Method Details
-
getParams
-
declarations
- Overrides:
declarationsin classYqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>, RESULT>
-
createTQueryParameter
protected tech.ydb.proto.ValueProtos.TypedValue createTQueryParameter(YqlType yqlType, Object o, boolean optional) - Overrides:
createTQueryParameterin classYqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>, RESULT>
-
getYqlType
- Overrides:
getYqlTypein classYqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>, RESULT>
-
getYqlValue
- Overrides:
getYqlValuein classYqlStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>, RESULT>
-
toQueryParameters
Description copied from interface:StatementReturns the query's parameter values as YDB protobuf structures.- Specified by:
toQueryParametersin interfaceStatement<PARAMS,ENTITY extends tech.ydb.yoj.repository.db.Entity<ENTITY>> - Overrides:
toQueryParametersin 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.- Returns:
- map: parameter name -> value as protobuf
-
TableDescriptorfor selecting correct entity table