Class: ActiveRecord::Extensions::OracleRegexp

Inherits:
RegexpBase
  • Object
show all
Defined in:
lib/ar-extensions/extensions.rb

Overview

ActiveRecord::Extension for implementing Regexp implementation for Oracle. See documention for RegexpBase.

Constant Summary

Constants inherited from RegexpBase

RegexpBase::NOT_EQUAL_RGX

Class Method Summary collapse

Methods inherited from RegexpBase

field_result

Class Method Details

.process(key, val, caller) ⇒ Object



415
416
417
418
419
# File 'lib/ar-extensions/extensions.rb', line 415

def self.process( key, val, caller )
  return nil unless val.is_a?( Regexp )
  r = field_result( key, caller )
  return Result.new( "#{r.negate? ? ' NOT ':''} REGEXP_LIKE(#{caller.quoted_table_name}.#{r.fieldname} , ?)", val )
end