berlindb / core

All of the required core code
MIT License
255 stars 29 forks source link

Refactor parse_query to be extendable by child classes #61

Closed alexstandiford closed 4 years ago

alexstandiford commented 4 years ago

Right now, parse_query has a pattern that makes it possible to manipulate the class using a WordPress action. This works, but it creates an awkward pattern when this action is referenced directly in the child class that uses it.

I think it would be better to change parse_query so that a protected method runs after it's done to serve the same fundamental purpose as the action that runs at the bottom of the method. This would allow extended classes to modify behavior in a cleaner manner.

alexstandiford commented 4 years ago

This doesn't really mean much right now, at least for me, until we actually have a way to run JOIN clauses in BerlinDB. I'm going to close this because I suspect this is not how BerlinDB intends to-do this sort of thing.