Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Lightweight DELETE Statement in SQLAlchemy #382

Open
franz101 opened this issue Jul 31, 2024 · 0 comments
Open

Support Lightweight DELETE Statement in SQLAlchemy #382

franz101 opened this issue Jul 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@franz101
Copy link

-- Deletes all rows from the `hits` table where the `Title` column contains the text `hello`
DELETE FROM hits WHERE Title LIKE '%hello%';

https://clickhouse.com/docs/en/sql-reference/statements/delete

Currently:

with clickhouse_client() as db_read:
    data = db_read.query(
        Record
    ).where(Record.node_id==data[0].node_id).delete()

``` would fail and ALTER TABLE is not recommended
@franz101 franz101 added the enhancement New feature or request label Jul 31, 2024
@franz101 franz101 changed the title Support Lightweight DELETE Statement Support Lightweight DELETE Statement in SQLAlchemy Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant