From f81965509d74a4607ecbc3cc6f91c2ca22919f3a Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 9 Apr 2014 14:31:10 -0700 Subject: add a compile method to the collectors --- lib/arel/collectors/bind.rb | 4 ++++ lib/arel/collectors/sql_string.rb | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/arel/collectors/bind.rb b/lib/arel/collectors/bind.rb index 4309de75c9..05cd966509 100644 --- a/lib/arel/collectors/bind.rb +++ b/lib/arel/collectors/bind.rb @@ -27,6 +27,10 @@ module Arel end end end + + def compile bvs + substitute_binds(bvs).join + end end end end diff --git a/lib/arel/collectors/sql_string.rb b/lib/arel/collectors/sql_string.rb index 526de66416..45001bb507 100644 --- a/lib/arel/collectors/sql_string.rb +++ b/lib/arel/collectors/sql_string.rb @@ -20,6 +20,10 @@ module Arel self << bind.to_s self end + + def compile bvs + value + end end end end -- cgit v1.2.3