Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sanitize GROUP BY etc. as well

  • Loading branch information...
commit 3845a2c6f6df9cb22a7f29bd90ccb4ed9ce4c987 1 parent 7490916
@methodmissing authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  README.textile
  2. +1 −1  lib/optimizations/columns/macro.rb
View
2  README.textile
@@ -214,7 +214,7 @@ h2. Todo
* Deeper coverage for Scrooge::AttributesProxy ( pending conversion to a subclass of Hash instead )
-* Extract Scrooge::Callsite
+* Test cases for Scrooge::Callsite
* Track both columns AND association invocations off Scrooge::Callsite
View
2  lib/optimizations/columns/macro.rb
@@ -28,7 +28,7 @@ module SingletonMethods
ScroogeBlankString = "".freeze
ScroogeComma = ",".freeze
- ScroogeRegexSanitize = /(?:LIMIT|WHERE).*/i
+ ScroogeRegexSanitize = /(?:LIMIT|WHERE|FROM|GROUP\s*BY|HAVING|ORDER\s*BY|PROCEDURE|FOR\s*UPDATE|INTO\s*OUTFILE).*/i
ScroogeRegexJoin = /(?:left|inner|outer|cross)*\s*(?:straight_join|join)/i
@@scrooge_select_regexes = {}
Please sign in to comment.
Something went wrong with that request. Please try again.