Class: Ambition::Adapters::ActiveRecord::DatabaseStatements::PostgreSQL

Inherits:
Abstract
  • Object
show all
Defined in:
lib/ambition/adapters/active_record/statements.rb

Instance Method Summary collapse

Instance Method Details

#not_regexp(regexp) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/ambition/adapters/active_record/statements.rb', line 28

def not_regexp(regexp)
  if regexp.options == 1
    '!~*'
  else
    '!~'
  end
end

#regexp(regexp) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/ambition/adapters/active_record/statements.rb', line 20

def regexp(regexp)
  if regexp.options == 1
    '~*'
  else
    '~'
  end
end