forrest79 / phpgsql

Simple and fast PHP database library for PostgreSQL with auto converting DB types to PHP and fluent interface for SQL query writing.
Other
11 stars 3 forks source link

ConditionExpression #27

Closed forrest79 closed 3 months ago

forrest79 commented 3 years ago

Create some sort of ConditionExpression, that will generate SQL expression IS NULL or expression = ? or expression IN (?, ?, ...) for all conditions without specified ? in it and will keep original expression where ? is included. Than we can use in Complex on another Complex or this ConditionExpression and in QueryBuilder we can use this to simplify building complex into SQL.

Create it in a way, where anybody can use this In Fluent\Query everywhere. Look at Db\Sql interface, how it's use. This new ConditionExpression can be used in the same way as Fluent\Query, it can generate SQL, so it could share some interface with creating SQL method.

forrest79 commented 7 months ago

A better idea #38?

forrest79 commented 3 months ago

38 is really better, closing.