module Sequel::SQL::StringMethods

  1. lib/sequel/extensions/escaped_like.rb

Methods

Public Instance

  1. escaped_ilike
  2. escaped_like

Public Instance methods

escaped_ilike(placeholder_pattern, placeholder_values)

Create a EscapedLikeExpression case insensitive pattern match of the receiver with the patterns, interpolated escaped values for each +?+ placeholder in the pattern.

Sequel[:a].escaped_ilike('?%', 'A') # "a" ILIKE 'A%' ESCAPE '\'
Sequel[:a].escaped_ilike('?%', '%A') # "a" ILIKE '\%A%' ESCAPE '\'
[show source]
   # File lib/sequel/extensions/escaped_like.rb
85 def escaped_ilike(placeholder_pattern, placeholder_values)
86   EscapedLikeExpression.new(self, false, placeholder_pattern, placeholder_values)
87 end
escaped_like(placeholder_pattern, placeholder_values)

Create a EscapedLikeExpression case sensitive pattern match of the receiver with the patterns, interpolated escaped values for each +?+ placeholder in the pattern.

Sequel[:a].escaped_like('?%', 'A') # "a" LIKE 'A%' ESCAPE '\'
Sequel[:a].escaped_like('?%', '%A') # "a" LIKE '\%A%' ESCAPE '\'
[show source]
   # File lib/sequel/extensions/escaped_like.rb
95 def escaped_like(placeholder_pattern, placeholder_values)
96   EscapedLikeExpression.new(self, true, placeholder_pattern, placeholder_values)
97 end