Comprehensive MSAccess support over both DBD::ODBC and DBD::ADO
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / SQLMaker / ACCESS.pm
1 package # Hide from PAUSE
2   DBIx::Class::SQLMaker::ACCESS;
3
4 use strict;
5 use warnings;
6 use base 'DBIx::Class::SQLMaker';
7
8 # MSAccess is retarded wrt multiple joins in FROM - it requires a certain
9 # way of parenthesizing each left part before each next right part
10 sub _recurse_from {
11   my @j = shift->_gen_from_blocks(@_);
12
13   # first 2 steps need no parenthesis
14   my $fin_join = join (' ', splice @j, 0, 2);
15
16   while (@j) {
17     $fin_join = sprintf '( %s ) %s', $fin_join, (shift @j);
18   }
19
20   # the entire FROM is *ALSO* expected aprenthesized
21   "( $fin_join )";
22 }
23
24 1;