8 use DBIC::SqlMakerTest;
14 my $schema = DBICTest->init_schema();
16 my $sql_maker = $schema->storage->sql_maker;
20 my ($sql, @bind) = $sql_maker->insert(
23 'day' => '2008-11-16',
24 'numbers' => [13, 21, 34, 55, 89]
30 q/INSERT INTO lottery (day, numbers) VALUES (?, ?)/,
31 [ ['day' => '2008-11-16'], ['numbers' => [13, 21, 34, 55, 89]] ],
32 'sql_maker passes arrayrefs in insert'
36 ($sql, @bind) = $sql_maker->update(
39 'day' => '2008-11-16',
40 'numbers' => [13, 21, 34, 55, 89]
46 q/UPDATE lottery SET day = ?, numbers = ?/,
47 [ ['day' => '2008-11-16'], ['numbers' => [13, 21, 34, 55, 89]] ],
48 'sql_maker passes arrayrefs in update'
52 # Make sure the carp/croak override in SQLA works (via SQLAHacks)
56 $schema->resultset ('Artist')->search ({}, { order_by => { -asc => 'stuff', -desc => 'staff' } } )->as_query;
57 }, qr/$file/, 'Exception correctly croak()ed');