Closed kokoshneta closed 1 year ago
there is not groupColumn( ) in SQL Server
there is not groupColumn( ) in SQL Server
I don’t understand your point. There isn’t a groupColumn()
function in any of the supported databases. There also aren’t format()
functions. These aren’t database functions, but PHP class methods in the adapter and the base class. All groupColumn()
does is abstract away the reference to the column being grouped by in a way that allows the different drivers to implement their own logic.
sorry , my bad
Closing this as outdated; replaced by #39.
First-time collaborator, be gentle. :-)
Since SQL Server is not yet supported, I thought I’d make an attempt at adding support.
Unlike the already supported drivers, SQL Server does not support grouping results by column aliases, which makes things a little trickier and required a few workarounds. The way I got around it was to add a
groupColumn()
method in the abstract adapter, which returns null, and then override that method in the SQL Server adapter, where instead it returns the date calculation. In the base class, an addedgroupColumn()
method calls the adapter method and then defaults to thedateAlias
if the adapter method returns null.