We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e87eeb commit 5535fc0Copy full SHA for 5535fc0
1 file changed
t/11-sql.t
@@ -3,7 +3,7 @@
3
use strict;
4
5
use Data::ObjectDriver::SQL;
6
-use Test::More tests => 90;
+use Test::More tests => 93;
7
8
my $stmt = ns();
9
ok($stmt, 'Created SQL object');
@@ -144,6 +144,11 @@ is(scalar @{ $stmt->bind }, 2);
144
is($stmt->bind->[0], 'bar');
145
is($stmt->bind->[1], 'baz');
146
147
+$stmt = ns(); $stmt->add_where(foo => { op => 'LIKE', value => 'bar%' });
148
+is($stmt->as_sql_where, "WHERE (foo LIKE ?)\n");
149
+is(scalar @{ $stmt->bind }, 1);
150
+is($stmt->bind->[0], 'bar%');
151
+
152
$stmt = ns(); $stmt->add_where(foo => { op => '!=', value => 'bar' });
153
is($stmt->as_sql_where, "WHERE (foo != ?)\n");
154
is(scalar @{ $stmt->bind }, 1);
0 commit comments