Class UpdateInStatement<T extends tech.ydb.yoj.repository.db.Entity<T>,RESULT>
java.lang.Object
tech.ydb.yoj.repository.ydb.statement.YqlStatement<UpdateInStatement.UpdateInStatementInput<T>,T,RESULT>
tech.ydb.yoj.repository.ydb.statement.UpdateInStatement<T,RESULT>
- All Implemented Interfaces:
Statement<UpdateInStatement.UpdateInStatementInput<T>,RESULT>
public class UpdateInStatement<T extends tech.ydb.yoj.repository.db.Entity<T>,RESULT>
extends YqlStatement<UpdateInStatement.UpdateInStatementInput<T>,T,RESULT>
Creates statement for UPDATE table SET values=values WHERE PK IN (PK1, PK2, ...).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUpdateInStatement.UpdateInStatementInput<T extends tech.ydb.yoj.repository.db.Entity<T>>Nested classes/interfaces inherited from interface tech.ydb.yoj.repository.ydb.statement.Statement
Statement.QueryType -
Field Summary
FieldsFields inherited from class tech.ydb.yoj.repository.ydb.statement.YqlStatement
itemsCollector, ORDER_BY_ID_ASCENDING, resultSchema, resultSetReader, schema, tableDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionUpdateInStatement(tech.ydb.yoj.repository.db.TableDescriptor<T> tableDescriptor, tech.ydb.yoj.repository.db.EntitySchema<T> schema, Schema<RESULT> resultSchema, UpdateInStatement.UpdateInStatementInput<T> in) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns parameterized YQL for this query.Returns query type (for query merging purposes).protected StringoutNames()Returns debug representation of this query with the specified parameter values.Returns the query's parameter values as YDB protobuf structures.Methods inherited from class tech.ydb.yoj.repository.ydb.statement.YqlStatement
createTQueryParameter, equals, escape, getDeclaration, getInSchemaType, getYqlType, getYqlValue, hashCode, isPreparable, mergeParts, mergeParts, nameEqVars, 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
readFromCache
-
Field Details
-
keysParam
- See Also:
-
-
Constructor Details
-
UpdateInStatement
-
-
Method Details
-
declarations
- Overrides:
declarationsin classYqlStatement<UpdateInStatement.UpdateInStatementInput<T extends tech.ydb.yoj.repository.db.Entity<T>>,T extends tech.ydb.yoj.repository.db.Entity<T>, RESULT>
-
getQueryType
Description copied from interface:StatementReturns query type (for query merging purposes).- Returns:
- query type
-
getQuery
Description copied from interface:StatementReturns parameterized YQL for this query.- Parameters:
tablespace- base path for all tables referenced in the query- Returns:
- YQL
-
getParams
- Overrides:
getParamsin classYqlStatement<UpdateInStatement.UpdateInStatementInput<T extends tech.ydb.yoj.repository.db.Entity<T>>,T extends tech.ydb.yoj.repository.db.Entity<T>, RESULT>
-
toQueryParameters
public Map<String,tech.ydb.proto.ValueProtos.TypedValue> toQueryParameters(UpdateInStatement.UpdateInStatementInput<T> params) Description copied from interface:StatementReturns the query's parameter values as YDB protobuf structures.- Specified by:
toQueryParametersin interfaceStatement<T extends tech.ydb.yoj.repository.db.Entity<T>,RESULT> - Overrides:
toQueryParametersin classYqlStatement<UpdateInStatement.UpdateInStatementInput<T extends tech.ydb.yoj.repository.db.Entity<T>>,T extends tech.ydb.yoj.repository.db.Entity<T>, RESULT> - Parameters:
params- parameter values Might benulldepending on the statement type, e.g. for DELETE statements.- Returns:
- map: parameter name -> value as protobuf
-
outNames
- Overrides:
outNamesin classYqlStatement<UpdateInStatement.UpdateInStatementInput<T extends tech.ydb.yoj.repository.db.Entity<T>>,T extends tech.ydb.yoj.repository.db.Entity<T>, RESULT>
-
toDebugString
Description copied from interface:StatementReturns debug representation of this query with the specified parameter values.- Parameters:
in- parameter values. Might benulldepending on the statement type, e.g. for DELETE statements.- Returns:
- debug representation of the query parameterized with
params
-