use lib qw(t/lib);
use DBICTest;
use Data::Dumper;
+use DBIC::SqlMakerTest;
my $schema = DBICTest->init_schema();
. 'child.father_id ) JOIN person mother ON ( mother.person_id '
. '= child.mother_id )'
;
-is( $sa->_recurse_from(@j), $match, 'join 1 ok' );
+is_same_sql_bind(
+ $sa->_recurse_from(@j), [],
+ $match, [],
+ 'join 1 ok'
+);
my @j2 = (
{ mother => 'person' },
. ' father.person_id = child.father_id )) ON ( mother.person_id = '
. 'child.mother_id )'
;
-is( $sa->_recurse_from(@j2), $match, 'join 2 ok' );
+is_same_sql_bind(
+ $sa->_recurse_from(@j2), [],
+ $match, [],
+ 'join 2 ok'
+);
+
my @j3 = (
{ child => 'person' },
. '= child.mother_id )'
;
-is( $sa->_recurse_from(@j3), $match, 'join 3 (inner join) ok');
+is_same_sql_bind(
+ $sa->_recurse_from(@j3), [],
+ $match, [],
+ 'join 3 (inner join) ok'
+);
my @j4 = (
{ mother => 'person' },
. ' father.person_id = child.father_id )) ON ( mother.person_id = '
. 'child.mother_id )'
;
-is( $sa->_recurse_from(@j4), $match, 'join 4 (nested joins + join types) ok');
+is_same_sql_bind(
+ $sa->_recurse_from(@j4), [],
+ $match, [],
+ 'join 4 (nested joins + join types) ok'
+);
my @j5 = (
{ child => 'person' },
. 'child.father_id ) JOIN person mother ON ( mother.person_id '
. '= child.mother_id )'
;
-is( $sa->_recurse_from(@j5), $match, 'join 5 (SCALAR reference for ON statement) ok' );
+is_same_sql_bind(
+ $sa->_recurse_from(@j5), [],
+ $match, [],
+ 'join 5 (SCALAR reference for ON statement) ok'
+);
my @j6 = (
{ child => 'person' },