Skip to content

Feature: use plain SQL to run the Query Builder delete method #4

@JasonTheAdams

Description

@JasonTheAdams

Right now the QueryBuilder::delete() method uses wpdb::delete() under the hood. This limits us to what that method is capable of. For example, want a WHERE X IN (SELECT...) clause in your delete method? Too bad. 😭

By switching to running simple SQL under the hood we make more complex conditions possible without much effort. The WHERE clause is simply converted to SQL and tacked onto the end, getting the full power of the Query Builder behind complex delete queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions