(
compiler, compile_state, stmt, c, implicit_return_defaults, values, kw
)
| 1218 | |
| 1219 | |
| 1220 | def _append_param_update( |
| 1221 | compiler, compile_state, stmt, c, implicit_return_defaults, values, kw |
| 1222 | ): |
| 1223 | include_table = compile_state.include_table_with_column_exprs |
| 1224 | if c.onupdate is not None and not c.onupdate.is_sequence: |
| 1225 | if c.onupdate.is_clause_element: |
| 1226 | values.append( |
| 1227 | ( |
| 1228 | c, |
| 1229 | compiler.preparer.format_column( |
| 1230 | c, |
| 1231 | use_table=include_table, |
| 1232 | ), |
| 1233 | compiler.process(c.onupdate.arg.self_group(), **kw), |
| 1234 | (), |
| 1235 | ) |
| 1236 | ) |
| 1237 | if implicit_return_defaults and c in implicit_return_defaults: |
| 1238 | compiler.implicit_returning.append(c) |
| 1239 | else: |
| 1240 | compiler.postfetch.append(c) |
| 1241 | else: |
| 1242 | values.append( |
| 1243 | ( |
| 1244 | c, |
| 1245 | compiler.preparer.format_column( |
| 1246 | c, |
| 1247 | use_table=include_table, |
| 1248 | ), |
| 1249 | _create_update_prefetch_bind_param(compiler, c, **kw), |
| 1250 | (c.key,), |
| 1251 | ) |
| 1252 | ) |
| 1253 | elif c.server_onupdate is not None: |
| 1254 | if implicit_return_defaults and c in implicit_return_defaults: |
| 1255 | compiler.implicit_returning.append(c) |
| 1256 | else: |
| 1257 | compiler.postfetch.append(c) |
| 1258 | elif ( |
| 1259 | implicit_return_defaults |
| 1260 | and (stmt._return_defaults_columns or not stmt._return_defaults) |
| 1261 | and c in implicit_return_defaults |
| 1262 | ): |
| 1263 | compiler.implicit_returning.append(c) |
| 1264 | |
| 1265 | |
| 1266 | @overload |
no test coverage detected