Skip to content

Commit

Permalink
Convert output string to StringBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
docelic committed Jan 7, 2018
1 parent 3234170 commit 1445194
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/text_to_sql_search.cr
Expand Up @@ -65,7 +65,7 @@ module TextToSqlSearch
tokens.reject! {|t| t.blank? }

# These initialize one-time and accumulate values as parsing advances
terms= config.first_element # Accumulated SQL WHERE terms
terms= String::Builder.new(config.first_element) # Accumulated SQL WHERE terms
values= [] of String # Their corresponding values (replacements for "?"s)
count= tokens.size # Total number of tokens we have for parsing
i= 0 # Current position in tokens array
Expand All @@ -91,7 +91,7 @@ module TextToSqlSearch
i+= 1
next
when config.passthru_closing
terms+= token
terms<< token
i+= 1
next
when config.and_word
Expand Down

0 comments on commit 1445194

Please sign in to comment.