162: def []=(attr, value)
163: case attr
164: when 'AutoCommit'
165: if value
166: @db.commit if @db.transaction_active?
167: else
168: @db.transaction unless @db.transaction_active?
169: end
170: @attr[attr] = value
171: when 'auto_vacuum', 'cache_size', 'count_changes',
172: 'default_cache_size', 'encoding', 'full_column_names',
173: 'page_size', 'short_column_names', 'synchronous',
174: 'temp_store', 'temp_store_directory'
175: @db.__send__((attr+'='), value)
176: @attr[attr] = @db.__send__(attr)
177: when 'busy_timeout'
178: @db.busy_timeout(value)
179: @attr[attr] = value
180: when 'busy_handler'
181: @db.busy_timeout(&value)
182: @attr[attr] = value
183: when 'type_translation'
184: @db.type_translation = value
185: @attr[attr] = value
186: else
187: raise DBI::NotSupportedError
188: end
189:
190: return value
191: end