Browse files

SQL Server needs to quote booleans just like MySQL 1/0

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 94a0592 commit 32021552125544d7cc2f548b1684a9f476845d58 @dhh dhh committed Oct 14, 2005
Showing with 8 additions and 0 deletions.
  1. +8 −0 activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
View
8 activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -293,6 +293,14 @@ def quote_string(string)
string.gsub(/\'/, "''")
end
+ def quoted_true
+ "1"
+ end
+
+ def quoted_false
+ "0"
+ end
+
def quote_column_name(name)
"[#{name}]"
end

0 comments on commit 3202155

Please sign in to comment.