-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I really like the short parameter syntax. It's great for reducing repetition. However, I want to enforce its use to be explicit, rather than implicitly used in set
operations.
For example, at the moment, this is how I write an update:
return new UpdateBuilder()
->table("todo")
->set("title")
->where(":id");
The :id
expands to id = :id
, but currently the single-parameter set also does this --- but I think that's too confusing.
This is what it should look like:
return new UpdateBuilder()
->table("todo")
->set(":title")
->where(":id");
The extra colon is instantly more readable. I understand that :title will be expanded to a named placeholder, just as it does in the where, but it also means I have the ability to write the set long-hand without worrying about implicit field expansions.
Metadata
Metadata
Assignees
Labels
No labels