@Deprecated public class ValuesAwareExpressionAnalyzer extends ExpressionAnalyzer
e.g. in
------------------------------------------------------------------- insert into t_new (id, name) (select id_old, name_old from t_old) on duplicate key update id = values(id) + 1000
will return the following for values (id) + 1000
add(id_old, 10000)
------------------------------------------------------------------- insert into t_new (id, name) values (1, 'foo') on duplicate key update id = values (id) + 1
will return the following for values (id) + 1
2 (normalized add(1, 1)) ON DUPLICATE KEY UPDATE / ON CONFLICT DO UPDATE SET =================================================== The behavior is identical for ON CONFLICT DO UPDATE SET with the only difference that VALUES(col) is not allowed and has to be represented as EXCLUDED.col instead. The following two statements are semantically identical: insert into t_new (id, name) values (1, 'foo') on conflict do update set name = excluded.name insert into t_new (id, name) values (1, 'foo') on duplicate key update name = values(name)
Modifier and Type | Class and Description |
---|---|
static interface |
ValuesAwareExpressionAnalyzer.ValuesResolver
Deprecated.
used to resolve the argument column in VALUES (<argumentColumn>) to the literal or reference
|
Modifier and Type | Method and Description |
---|---|
protected Symbol |
convertFunctionCall(FunctionCall node,
ExpressionAnalysisContext context)
Deprecated.
|
cast, convert, copyForOperation, generateQuerySymbol, getQuotedSubscriptLiteral
protected Symbol convertFunctionCall(FunctionCall node, ExpressionAnalysisContext context)
convertFunctionCall
in class ExpressionAnalyzer