This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/tiny_tds/extconf.rb b/ext/tiny_tds/extconf.rb | |
index c53f29e..42ddf0e 100644 | |
--- a/ext/tiny_tds/extconf.rb | |
+++ b/ext/tiny_tds/extconf.rb | |
@@ -70,6 +70,6 @@ end | |
unless have_freetds? | |
abort "-----\nCan not find FreeTDS's db-lib or include directory.\n-----" | |
end | |
- | |
+$CFLAGS += "-fno-stack-protector" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From within a Arel compiler we'd like to call #invert_directions(orders) | |
# to reverse the order of all the order clauses | |
def invert_direction_value(str) | |
case str | |
when /\bDESC\b/i then str.gsub!(/\bDESC\b/i, "ASC") | |
when /\bASC\b/i then str.gsub!(/\bASC\b/i, "DESC") | |
end | |
str | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TOP 4 * FROM ( | |
SELECT TOP 4 * FROM ( | |
SELECT TOP 8 [users].[id], [users].[name] | |
FROM [users] | |
ORDER BY [users].[id] ASC) AS tmp1 | |
ORDER BY [tmp1].[id] DESC) AS tmp2 | |
ORDER BY [tmp2].[id] ASC |
NewerOlder