lib/prosopite.rb in prosopite-1.3.1 vs lib/prosopite.rb in prosopite-1.3.2
- old
+ new
@@ -177,9 +177,11 @@
query.gsub!(/\bnull\b/i, "?")
query.gsub!(/\b(in|values?)(?:[\s,]*\([\s?,]*\))+/, "\\1(?+)")
+ query.gsub!(/(?<!\w)field\s*\(\s*(\S+)\s*,\s*(\?+)(?:\s*,\s*\?+)*\)/, 'field(\1, \2+)')
+
query.gsub!(/\b(select\s.*?)(?:(\sunion(?:\sall)?)\s\1)+/, "\\1 /*repeat\\2*/")
query.gsub!(/\blimit \?(?:, ?\?| offset \?)/, "limit ?")
if query =~ /\border by/