auraphp / Aura.SqlQuery

Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.
MIT License
450 stars 86 forks source link

Add *whereBoundValue functions to Where trait and interface #165

Open dc2xl opened 6 years ago

dc2xl commented 6 years ago

This is a working minimal implementation for https://github.com/auraphp/Aura.SqlQuery/issues/164 to get coding feedback.

Implementation is directly in the WhereTrait with a separate function name ("whereBoundValue") in order to keep the where function interfaces clean.

As alternative to the direct implementation I considered having a separate trait; so the framework user could easily decide if the functionality is wanted by composing traits. But this seems infeasible considering how the factory/implementation lookup works.

What is mainly missing is *having support.

dc2xl commented 6 years ago

Just a note what we did inhouse to extend the functionality - we extended the QueryFactory#newSelect to return a Select instance extended by a trait which contains the necessary functionality. The problem with that implementation is that extended QueryFactory hardwires the database dialect.