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::EQUAL_RGX, RegexpBase::NOT_EQUAL_RGX

Class Method Summary collapse

Methods inherited from RegexpBase

field_result

Class Method Details

.process(key, val, caller) ⇒ Object



422
423
424
425
426
# File 'lib/ar-extensions/extensions.rb', line 422

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