mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
initial commit for collector implementation
This commit is contained in:
parent
dbe1f8b29a
commit
df52f7ca2f
1 changed files with 26 additions and 0 deletions
26
lib/arel/collectors/sql_string.rb
Normal file
26
lib/arel/collectors/sql_string.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
module Arel
|
||||
module Collectors
|
||||
class SQLString
|
||||
def initialize
|
||||
@str = ''
|
||||
end
|
||||
|
||||
def value
|
||||
@str
|
||||
end
|
||||
|
||||
def << str
|
||||
@str << str
|
||||
self
|
||||
end
|
||||
|
||||
def start; self; end
|
||||
def finish; self; end
|
||||
|
||||
def add_bind bind
|
||||
self << bind
|
||||
self
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue