[Dbix-class] Time to start testing SQL::Abstract dev releases, please

Matt S Trout mst at shadowcat.co.uk
Sun Oct 13 19:08:45 GMT 2019


https://metacpan.org/release/MSTROUT/SQL-Abstract-1.90_03

is the latest, and DBIx::Class cpan installs against it, so I've hopefully
not cocked up compatibility *too* badly though I'm sure we're going to need
to add a bunch of extra test cases as you guys start beating on it.

(Mojo::Pg needed its tests switching to SQL::Abstract::Test and that's in
master but not yet released)

This release seperates the SQL generation into two phases, a DWIM expression
-> explicit abstract query tree phase, and then a phase that takes an AQT
and converts it to SQL+bind parameters.

Best elucidation of this currently is SQL::Abstract::Reference and this dev
release also provides a proof of concept SQLMaker role that does its best
to expose all of the new features in spite of the horrible things that I did
in SQLMaker years ago. Short notes on how that works out here:

https://metacpan.org/pod/release/MSTROUT/SQL-Abstract-1.90_03/lib/DBIx/Class/SQLMaker/Role/SQLA2Passthrough.pm

Additionally, the ExtraClauses and BangOverrides plugin between them expose
clauses that DBIx::Class doesn't know about and allows wrapping existing ones
- for examples of adding extra custom joins, and of using the new SQLA2 CTE
support, see:

https://metacpan.org/pod/release/MSTROUT/SQL-Abstract-1.90_03/lib/SQL/Abstract/Plugin/BangOverrides.pm

Additionally, there's now a much more elegant and powerful extension system
as documented in SQL::Abstract itself (though you'll want to read ::Reference
as well to understand exactly how and why you might want to use it).

Bend it, break it, provide feedback, please.

-- 
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue

http://shadowcat.co.uk/blog/matt-s-trout/   http://twitter.com/shadowcat_mst/

Email me now on mst (at) shadowcat.co.uk and let's chat about how our CPAN
commercial support, training and consultancy packages could help your team.



More information about the DBIx-Class mailing list