During the last few months I’ve been working on the CPAN distribution SQL::Abstract::Query. The drive for doing this is that DBIx::ResultSet (another module of mine) currently has lack-luster support for auto-incrementing IDs, has a custom and inflexible solution for GROUP BY, and has no support for JOINs.
To solve the first problem, with lack of good auto-incrementing ID support I wanted to make a generic module that would allow anyone to retrieve these IDs and could be used independently from DBIx::ResultSet. So, I set out to build DBIx::AutoID. I quickly found that there is a huge myriad of complexities to do this right for all the different databases out there. In the end I came to the conclusion that I need some way for an INSERT to be represented as an object so that DBIx::AutoID can modify it, if it needs to, before it is executed so that the ID may be returned.
The second two issues, bad support for GROUP BY and none for JOINS, really just required extending SQL::Abstract and overriding its behavior.
So, take a look at SQL::Abstract::Query on CPAN and let me know what you think. I’d really like to get some feedback. There is a large list of TODOs, but I’m confident that the interface as it is now won’t change much, just the internal guts need some work here and there.
Expect DBIx::AutoID (with inspiration from DBIx::Class) to be on CPAN in a few weeks as well. Then, I’ll get around to updating DBIx::ResultSet with all these new and more powerful features.
PS: The current development work is being done on the SQL-Abstract-Query github repository.