Skip to content

Commit

Permalink
sqlite3 tests passing again
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Apr 9, 2014
1 parent 8522365 commit f6d46d9
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,22 @@ def initialize(connection, logger, config)
end

class BindCollector < Arel::Collectors::Bind
def initialize(conn)
@conn = conn
super()
def compile(bvs, conn)
super(bvs.map { |bv| conn.quote(*bv.reverse) })
end
end

def compile(bvs)
super(bvs.map { |bv| @conn.quote(*bv.reverse) })
class SQLString < Arel::Collectors::SQLString
def compile(bvs, conn)
super(bvs)
end
end

def collector
if @prepared_statements
Arel::Collectors::SQLString.new
SQLString.new
else
BindCollector.new self
BindCollector.new
end
end

Expand Down

0 comments on commit f6d46d9

Please sign in to comment.