module Predicate::NadicBool

Public Instance Methods

to_sql(buffer, dialect) click to toggle source
# File lib/bmg/sql/ext/predicate/nadic_bool.rb, line 4
def to_sql(buffer, dialect)
  each_with_index do |child, index|
    next if index == 0
    unless index == 1
      buffer << Sql::Expr::SPACE << to_sql_operator << Sql::Expr::SPACE
    end
    child.to_sql(buffer, dialect)
  end
  buffer
end