8 my $schema = DBICTest->init_schema(no_populate => 1);
9 my $ars = $schema->resultset('Artist');
12 my $ref1 = \['?', [name => 'foo']];
13 my $ref2 = \['?', [name => 'bar']];
14 my $ref3 = \['?', [name => 'baz']];
16 # do it twice, make sure the args are untouched
21 $ars->create({ artistid => 666, name => $ref1, rank => $rank });
22 } 'inserted row using literal sql';
24 ok (($ars->search({ name => 'foo' })->first),
28 $ars->search({ name => { '=' => $ref1} })->update({ name => $ref2, rank => $rank });
29 } 'search/updated row using literal sql';
31 ok (($ars->search({ name => 'bar' })->first),
35 $ars->populate([{ artistid => 777, name => $ref3, rank => $rank }]);
36 } 'populated row using literal sql';
38 ok (($ars->search({ name => 'baz' })->first),
44 \['?', [name => 'foo']],
49 \['?', [name => 'bar']],
54 \['?', [name => 'baz']],