Module SDK & DBQuery

I just started tinkering with this now, haven’t fully grasped how to use it yet so correct me if this is already possible …

I think it’d be pretty nifty to, instead of using …

query.addTable("Table");
query.addColumn("Column1");
query.addColumn("Column2");
// etc

… be able to use …

query.addTable("Table").addColumn("Column1").addColumn("Column2");

… kind of like a fluent API type deal.

Yeah, I like this pattern as well. I don’t really see any reason it wouldn’t work on DBQuery other than that the author didn’t write it that way :stuck_out_tongue:

:slight_smile: … no worries, it was just on my mind while I was messing with it, figured I’d just put it out there. I like the idea of being able to break down a query programatically, pretty nifty.

Thanks!

I modified the add* methods to return ‘this’ so you can chain the calls together. You’ll see it in the 7.4 final release.

[quote=“Kevin.Herron”]I modified the add* methods to return ‘this’ so you can chain the calls together. You’ll see it in the 7.4 final release.[/quote]Sweet! I can scrap the DBQueryBuilder class I’ve got now :smiley:

Thanks!