Looking at the code from this PR, I saw a class called QueryGenerator that could save me coding I think. Can anyone explain a bit about this class?
Thread Rating:
The QueryGenerator class
|
07-17-2017, 11:06 AM
QueryGenerator class is a very powerful query abstraction capable of generating very complex SQL for any module in the system.
At a very high level it is: - instantiate against a module - indicate the fields you want - indicate the conditons - ask for the SQL Look at the unit test for some examples: https://github.com/tsolucio/coreBOSTests/blob/master/include/QueryGenerator/QueryGeneratorTest.php
Joe
TSolucio
07-24-2017, 06:13 PM
Cool, I've skimmed through it. Seems like a wrapper for complex queries yes. Does it also take into account address tables for modules like accounts, salesorders etc.?
07-24-2017, 08:50 PM
Yes, it does!
I just added a couple of tests: https://github.com/tsolucio/coreBOSTests/commit/f8b33ae6366169476403b6acd3150f1b21f1e47c
Joe
TSolucio
07-25-2017, 09:35 AM
Cool, check out this function in my Schedular module, where I wrote a whole query function (which is not perfect yet). I think I could simplify this by using the Query Generator.
07-25-2017, 02:00 PM
wow! definitely, this class can help there :-)
Patience, I learned about a condition class for events this past week that exists in the code for over 6 years!!
Joe
TSolucio
07-26-2017, 10:23 AM
Cool, I'll wait a bit for that then.
07-26-2017, 11:19 AM
Sorry, I didn't express myself correctly nor understood that you need help.
I meant that I found a class while I was documenting that I didn't know existed, still, after all this time. It is not related to query generator. If you need help with QG, let me know.
Joe
TSolucio
07-26-2017, 02:29 PM
No problem, I understood kind of what you meant, but thought I could use the class in my AJAX function. Anyway I'll get back here if I need help on the QG class.
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)