Open Divi opened 1 year ago
@Divi Thanks for looking into this, would love to get this in!
The additional tests are much appreciated, definitely helps to get some certainty with this feature. It looks like some cases aren't covered right now, can you add some additional tests to ensure this works properly when using the same placeholder name multiple times (SELECT * FROM user WHERE name = :name OR email = :name
) and also what happens if the placeholder value contains strings that look like placeholders (['name' => 'is :this a placeholder?']
).
Just to let you know, I've not forgotten you, I just don't have enough time for now but I keep in mind your request :)
Hello!
I saw a previous pull request about the named parameters. Since there is no activity for 3 years now, I took the liberty to make my own implementation and update the unit tests.
It allows:
Of course, all the previous ways of querying still work. I can update the README if needed.