Welcome Guest, Not a member yet? Register   Sign In
Poll: Do you think this would be helpful?
You do not have permission to vote in this poll.
Yes
50.00%
3 50.00%
No
33.33%
2 33.33%
I don't use Soft Deletes
16.67%
1 16.67%
Total 6 vote(s) 100%
* You voted for this item. [Show Results]

Query Builder Soft Deletes
#4

I agree with MGatner. It doesn't belong in the query builder. The builder is exactly that, a class to build generic SQL queries. It knows nothing about the business logic of your app and what column do what. Especially in the case where the "deleted_at" column has a different name. Also it would be even more confusing if I do a select(*) and it doesn't return everything because it decided to exclude the soft deleted rows.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
Query Builder Soft Deletes - by PwrSrg - 05-26-2021, 07:46 AM
RE: Query Builder Soft Deletes - by seunex - 05-26-2021, 10:21 AM
RE: Query Builder Soft Deletes - by MGatner - 05-28-2021, 06:39 PM
RE: Query Builder Soft Deletes - by includebeer - 05-29-2021, 08:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB