summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB.pm')
-rw-r--r--Bugzilla/DB.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index 40cd3e3a1..2a71bcd75 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -391,6 +391,11 @@ sub sql_string_concat {
return '(' . join(' || ', @params) . ')';
}
+sub sql_in {
+ my ($self, $column_name, $in_list_ref) = @_;
+ return " $column_name IN (" . join(',', @$in_list_ref) . ") ";
+}
+
sub sql_fulltext_search {
my ($self, $column, $text) = @_;
@@ -1918,6 +1923,32 @@ will not be usually used unless it was created as LOWER(column).
=back
+=item C<sql_in>
+
+=over
+
+=item B<Description>
+
+Returns SQL syntax for the C<IN ()> operator.
+
+Only necessary where an C<IN> clause can have more than 1000 items.
+
+=item B<Params>
+
+=over
+
+=item C<$column_name> - Column name (e.g. C<bug_id>)
+
+=item C<$in_list_ref> - an arrayref containing values for C<IN ()>
+
+=back
+
+=item B<Returns>
+
+Formatted SQL for the C<IN> operator.
+
+=back
+
=item C<bz_lock_tables>
=over