(
compiler: SQLCompiler,
stmt: ValuesBase,
c: ColumnClause[Any],
values: List[_CrudParamElementSQLExpr],
kw: Dict[str, Any],
)
| 1240 | |
| 1241 | |
| 1242 | def _append_param_insert_select_hasdefault( |
| 1243 | compiler: SQLCompiler, |
| 1244 | stmt: ValuesBase, |
| 1245 | c: ColumnClause[Any], |
| 1246 | values: List[_CrudParamElementSQLExpr], |
| 1247 | kw: Dict[str, Any], |
| 1248 | ) -> None: |
| 1249 | if default_is_sequence(c.default): |
| 1250 | if compiler.dialect.supports_sequences and ( |
| 1251 | not c.default.optional or not compiler.dialect.sequences_optional |
| 1252 | ): |
| 1253 | values.append( |
| 1254 | ( |
| 1255 | c, |
| 1256 | compiler.preparer.format_column(c), |
| 1257 | c.default.next_value(), |
| 1258 | (), |
| 1259 | ) |
| 1260 | ) |
| 1261 | elif default_is_clause_element(c.default): |
| 1262 | values.append( |
| 1263 | ( |
| 1264 | c, |
| 1265 | compiler.preparer.format_column(c), |
| 1266 | c.default.arg.self_group(), |
| 1267 | (), |
| 1268 | ) |
| 1269 | ) |
| 1270 | else: |
| 1271 | values.append( |
| 1272 | ( |
| 1273 | c, |
| 1274 | compiler.preparer.format_column(c), |
| 1275 | _create_insert_prefetch_bind_param( |
| 1276 | compiler, c, process=False, **kw |
| 1277 | ), |
| 1278 | (c.key,), |
| 1279 | ) |
| 1280 | ) |
| 1281 | |
| 1282 | |
| 1283 | def _append_param_update( |
no test coverage detected