Skip to content

Consider disallowing DELETE FROM and UPDATE queries without explicit WHERE clauses #1

@despawnerer

Description

@despawnerer

Generally speaking, people may want to delete everything, so they should have an option to do that. But that's a relatively rare case and the default can be safer:

delete_from("Dummy").to_string();  // ❌ should not compile
delete_from("Dummy").all().to_string();  // ✅ good, explicitly deletes everything
delete_from("Dummy").where_("x > 1").to_string();  // ✅ good, explicitly has a condition

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions