Module: Sequel::SQL::StringMethods
- Included in:
- LiteralString, GenericExpression, StringExpression, Symbol
- Defined in:
- lib/sequel/sql.rb
Overview
This module includes the methods that are defined on objects that can be used in a string context in SQL (Symbol, LiteralString, SQL::Function, and SQL::StringExpression).
This defines the like (LIKE) and ilike methods, used for pattern matching. like is case sensitive, ilike is case insensitive.
Instance Method Summary collapse
-
#ilike(*ces) ⇒ Object
Create a BooleanExpression case insensitive pattern match of self with the given patterns.
-
#like(*ces) ⇒ Object
Create a BooleanExpression case sensitive pattern match of self with the given patterns.
Instance Method Details
#ilike(*ces) ⇒ Object
Create a BooleanExpression case insensitive pattern match of self with the given patterns. See StringExpression.like.
336 337 338 |
# File 'lib/sequel/sql.rb', line 336 def ilike(*ces) StringExpression.like(self, *(ces << {:case_insensitive=>true})) end |
#like(*ces) ⇒ Object
Create a BooleanExpression case sensitive pattern match of self with the given patterns. See StringExpression.like.
342 343 344 |
# File 'lib/sequel/sql.rb', line 342 def like(*ces) StringExpression.like(self, *ces) end |