mirror of
https://github.com/lloeki/rebel.git
synced 2025-12-06 01:54:40 +01:00
Add IS NOT, NOT IN, NOT LIKE
This commit is contained in:
parent
000e7f2ae2
commit
422defeecd
2 changed files with 23 additions and 0 deletions
|
|
@ -132,6 +132,7 @@ module Rebel::SQL
|
|||
end
|
||||
end
|
||||
alias != ne
|
||||
alias is_not ne
|
||||
|
||||
def lt(n)
|
||||
Raw.new("#{self} < #{Rebel::SQL.name_or_value(n)}")
|
||||
|
|
@ -157,9 +158,17 @@ module Rebel::SQL
|
|||
Raw.new("#{self} IN (#{Rebel::SQL.values(*v)})")
|
||||
end
|
||||
|
||||
def not_in(*v)
|
||||
Raw.new("#{self} NOT IN (#{Rebel::SQL.values(*v)})")
|
||||
end
|
||||
|
||||
def like(n)
|
||||
Raw.new("#{self} LIKE #{Rebel::SQL.value(n)}")
|
||||
end
|
||||
|
||||
def not_like(n)
|
||||
Raw.new("#{self} NOT LIKE #{Rebel::SQL.value(n)}")
|
||||
end
|
||||
end
|
||||
|
||||
@identifier_quote = '"'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue