# File lib/jdbc_adapter/jdbc_mysql.rb, line 28 def self.adapter_matcher(name, *) name =~ /mysql/ ? self : false end
# File lib/jdbc_adapter/jdbc_mysql.rb, line 223 def charset show_variable("character_set_database") end
# File lib/jdbc_adapter/jdbc_mysql.rb, line 227 def collation show_variable("collation_database") end
# File lib/jdbc_adapter/jdbc_mysql.rb, line 169 def current_database select_one("SELECT DATABASE() as db")["db"] end
# File lib/jdbc_adapter/jdbc_mysql.rb, line 66 def modify_types(tp) tp[:primary_key] = "int(11) DEFAULT NULL auto_increment PRIMARY KEY" tp[:decimal] = { :name => "decimal" } tp[:timestamp] = { :name => "datetime" } tp[:datetime][:limit] = nil tp end
QUOTING ==================================================
# File lib/jdbc_adapter/jdbc_mysql.rb, line 76 def quote(value, column = nil) return value.quoted_id if value.respond_to?(:quoted_id) if column && column.type == :primary_key value.to_s elsif column && String === value && column.type == :binary && column.class.respond_to?(:string_to_binary) s = column.class.string_to_binary(value).unpack("H*")[0] "x'#{s}'" elsif BigDecimal === value "'#{value.to_s("F")}'" else super end end
# File lib/jdbc_adapter/jdbc_mysql.rb, line 95 def quoted_false "0" end
# File lib/jdbc_adapter/jdbc_mysql.rb, line 91 def quoted_true "1" end
Generated with the Darkfish Rdoc Generator 2.