berlindb / core

All of the required core code
MIT License
253 stars 27 forks source link

Remove need for \Query::date_query_sql #36

Closed JJJ closed 4 years ago

JJJ commented 4 years ago

Because of the way the Date Query class currently works (it being inherited from WordPress) the resulting MySQL string needs to be stashed temporarily in a private variable, so that it can be referred to later in a different method.

This is not ideal for a few reasons:

It would be much better for it to work more like Meta & Compare, and simply return everything it needs all at once, and provide a subsequent get_sql() method to retrieve the query string part as needed.

JJJ commented 4 years ago

Marking as a Task for 1.1.0 as this is a blocker for other ongoing work.