mirror of
https://github.com/lloeki/rebel.git
synced 2025-12-06 10:04:39 +01:00
fix clause passing
This commit is contained in:
parent
421ae6d32e
commit
2c727a38cb
1 changed files with 7 additions and 7 deletions
|
|
@ -73,20 +73,20 @@ module Rebel::SQL
|
||||||
n ? as(n) : self
|
n ? as(n) : self
|
||||||
end
|
end
|
||||||
|
|
||||||
def on(clause)
|
def on(*clause)
|
||||||
Raw.new(self + " ON #{Rebel::SQL.and_clause(clause)}")
|
Raw.new(self + " ON #{Rebel::SQL.and_clause(*clause)}")
|
||||||
end
|
end
|
||||||
|
|
||||||
def on?(clause)
|
def on?(*clause)
|
||||||
clause ? on(clause) : self
|
clause ? on(clause) : self
|
||||||
end
|
end
|
||||||
|
|
||||||
def and(clause)
|
def and(*clause)
|
||||||
Raw.new("#{self} AND #{Rebel::SQL.and_clause(clause)}")
|
Raw.new("#{self} AND #{Rebel::SQL.and_clause(*clause)}")
|
||||||
end
|
end
|
||||||
|
|
||||||
def or(clause)
|
def or(*clause)
|
||||||
Raw.new("#{self} OR #{Rebel::SQL.and_clause(clause)}").wants_parens!
|
Raw.new("#{self} OR #{Rebel::SQL.and_clause(*clause)}").wants_parens!
|
||||||
end
|
end
|
||||||
|
|
||||||
def eq(n)
|
def eq(n)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue