Changeset 8794
- Timestamp:
- 02/03/08 12:11:52 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
r8757 r8794 156 156 "Broken pipe", 157 157 "Lost connection to MySQL server during query", 158 "MySQL server has gone away" 159 ] 158 "MySQL server has gone away" ] 159 160 QUOTED_TRUE, QUOTED_FALSE = '1', '0' 160 161 161 162 def initialize(connection, logger, connection_options, config) 162 163 super(connection, logger) 163 164 @connection_options, @config = connection_options, config 164 165 @quoted_column_names, @quoted_table_names = {}, {} 165 166 connect 166 167 end … … 206 207 207 208 def quote_column_name(name) #:nodoc: 208 "`#{name}`"209 @quoted_column_names[name] ||= "`#{name}`" 209 210 end 210 211 211 212 def quote_table_name(name) #:nodoc: 212 quote_column_name(name).gsub('.', '`.`')213 @quoted_table_names[name] ||= quote_column_name(name).gsub('.', '`.`') 213 214 end 214 215 … … 218 219 219 220 def quoted_true 220 "1"221 QUOTED_TRUE 221 222 end 222 223 223 224 def quoted_false 224 "0"225 QUOTED_FALSE 225 226 end 226 227