orator icon indicating copy to clipboard operation
orator copied to clipboard

Added method QueryBuilder().remove_where(column)

Open ar45 opened this issue 5 years ago • 0 comments

Sometimes we need to dynamically remove a where clause referencing a particular column and somtimes, only when the clause involves a particular operator.

Can be used as

Remove all clasues referencing column_a

query.remove_where('column_a')

Remove all clasues referencing column_a with operator !=

query.remove_where('column_a', '!=')

Store the bindings for each where on the where dict within self.wheres so that we can easily remove the clause and it's bindings.

ar45 avatar May 31 '19 06:05 ar45