lib/UR/DataSource/RDBMS/Operator/Like.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 11 | 100.0 |
branch | 1 | 2 | 50.0 |
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 15 | 17 | 88.2 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | 11 | 11 | 6845 | use strict; | |||
11 | 18 | ||||||
11 | 365 | ||||||
2 | 11 | 11 | 39 | use warnings; | |||
11 | 15 | ||||||
11 | 1449 | ||||||
3 | |||||||
4 | package UR::DataSource::RDBMS::Operator::Like; | ||||||
5 | |||||||
6 | sub generate_sql_for { | ||||||
7 | 38 | 38 | 0 | 91 | my($class, $expr_sql, $val, $escape) = @_; | ||
8 | |||||||
9 | 38 | 76 | my $sql = "$expr_sql like ?"; | ||||
10 | 38 | 50 | 107 | if ($escape) { | |||
11 | 38 | 89 | $sql .= " escape $escape"; | ||||
12 | } | ||||||
13 | 38 | 135 | return ($sql, $val); | ||||
14 | } | ||||||
15 | |||||||
16 | 1; |