(self)
| 6422 | ) |
| 6423 | |
| 6424 | def test_dialect_specific_sql(self): |
| 6425 | my_table = table( |
| 6426 | "my_table", column("id"), column("data"), column("user_email") |
| 6427 | ) |
| 6428 | |
| 6429 | from sqlalchemy.dialects.postgresql import insert |
| 6430 | |
| 6431 | insert_stmt = insert(my_table).values( |
| 6432 | id="some_existing_id", data="inserted value" |
| 6433 | ) |
| 6434 | |
| 6435 | do_update_stmt = insert_stmt.on_conflict_do_update( |
| 6436 | index_elements=["id"], set_=dict(data="updated value") |
| 6437 | ) |
| 6438 | eq_ignore_whitespace( |
| 6439 | str(do_update_stmt), |
| 6440 | "INSERT INTO my_table (id, data) VALUES (%(id)s, %(data)s) " |
| 6441 | "ON CONFLICT (id) DO UPDATE SET data = %(param_1)s", |
| 6442 | ) |
| 6443 | |
| 6444 | def test_dialect_specific_ddl(self): |
| 6445 | from sqlalchemy.dialects.postgresql import ExcludeConstraint |
nothing calls this directly
no test coverage detected