Class Index [+]

Quicksearch

DataMapper::Query::Conditions::LikeComparison

Tests whether the value in the record is like the expected set for the Comparison. Equivalent to a LIKE clause in an SQL database.

TODO: move this to dm-more with DataObjectsAdapter plugins

Private Instance Methods

comparator_string() click to toggle source

@return [String]

@see AbstractComparison#to_s

@api private

     # File lib/dm-core/query/conditions/comparison.rb, line 781
781:         def comparator_string
782:           'LIKE'
783:         end
expected() click to toggle source

Overloads the expected method in AbstractComparison

Return a regular expression suitable for matching against the records value.

@return [Regexp]

@see AbtractComparison#expected

@api semipublic

     # File lib/dm-core/query/conditions/comparison.rb, line 772
772:         def expected
773:           Regexp.new('\A' << super.gsub('%', '.*').tr('_', '.') << '\z')
774:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.