Fix and test first_skip/skip_first limit dialects
authorPeter Rabbitson <ribasushi@cpan.org>
Thu, 1 Dec 2011 16:50:57 +0000 (17:50 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Mon, 5 Dec 2011 10:24:27 +0000 (11:24 +0100)
commit8b31f62e2b395fba451c32e0bbfecbd3e0f673f8
tree153657204cc7a6a8dbda472f1706f1f20088a697
parent10419db5494d63347dd0f799f8af23d6d3440f62
Fix and test first_skip/skip_first limit dialects

Codebase didn't take in account the fact that limit bindvals for
SELECT FIRST x SKIP y and SELECT FIRST x SKIP y need to be inserted
at the head of the bind-assembly chain. Hence introducing a new
bind-chunk position 'pre_select'. While at it move the TOP dialect
to use it as well.

Extensive tests for both dialects, and also augment the test for
the Oracle RowNum dialect (no fixes necessary)
Changes
lib/DBIx/Class/SQLMaker.pm
lib/DBIx/Class/SQLMaker/LimitDialects.pm
lib/DBIx/Class/SQLMaker/Oracle.pm
t/sqlmaker/limit_dialects/first_skip.t [new file with mode: 0644]
t/sqlmaker/limit_dialects/rownum.t
t/sqlmaker/limit_dialects/skip_first.t [new file with mode: 0644]