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
|
||||
end
|
||||
|
||||
def on(clause)
|
||||
Raw.new(self + " ON #{Rebel::SQL.and_clause(clause)}")
|
||||
def on(*clause)
|
||||
Raw.new(self + " ON #{Rebel::SQL.and_clause(*clause)}")
|
||||
end
|
||||
|
||||
def on?(clause)
|
||||
def on?(*clause)
|
||||
clause ? on(clause) : self
|
||||
end
|
||||
|
||||
def and(clause)
|
||||
Raw.new("#{self} AND #{Rebel::SQL.and_clause(clause)}")
|
||||
def and(*clause)
|
||||
Raw.new("#{self} AND #{Rebel::SQL.and_clause(*clause)}")
|
||||
end
|
||||
|
||||
def or(clause)
|
||||
Raw.new("#{self} OR #{Rebel::SQL.and_clause(clause)}").wants_parens!
|
||||
def or(*clause)
|
||||
Raw.new("#{self} OR #{Rebel::SQL.and_clause(*clause)}").wants_parens!
|
||||
end
|
||||
|
||||
def eq(n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue