Changeset 3205
- Timestamp:
- 12/02/05 01:19:18 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r3202 r3205 1 1 *SVN* 2 3 * Firebird: active? and reconnect! methods for handling stale connections. #428 [Ken Kunz <kennethkunz@gmail.com>] 2 4 3 5 * Firebird: updated for FireRuby 0.4.0. #3009 [Ken Kunz <kennethkunz@gmail.com>] trunk/activerecord/lib/active_record/connection_adapters/firebird_adapter.rb
r3202 r3205 32 32 end 33 33 options = config[:charset] ? { CHARACTER_SET => config[:charset] } : {} 34 connection_params = [config[:username], config[:password], options] 34 35 db = FireRuby::Database.new_from_params(*config.values_at(:database, :host, :port, :service)) 35 connection = db.connect( config[:username], config[:password], options)36 ConnectionAdapters::FirebirdAdapter.new(connection, logger )36 connection = db.connect(*connection_params) 37 ConnectionAdapters::FirebirdAdapter.new(connection, logger, connection_params) 37 38 end 38 39 end … … 241 242 cattr_accessor :boolean_domain 242 243 244 def initialize(connection, logger, connection_params=nil) 245 super(connection, logger) 246 @connection_params = connection_params 247 end 248 243 249 def adapter_name # :nodoc: 244 250 'Firebird' … … 254 260 "#{table_name}_seq" 255 261 end 262 256 263 257 264 # QUOTING ================================================== … … 280 287 quote(boolean_domain[:false]) 281 288 end 289 290 291 # CONNECTION MANAGEMENT ==================================== 292 293 def active? 294 not @connection.closed? 295 end 296 297 def reconnect! 298 @connection.close 299 @connection = @connection.database.connect(*@connection_params) 300 end 301 282 302 283 303 # DATABASE STATEMENTS ====================================== … … 340 360 FireRuby::Generator.new(sequence_name, @connection).next(1) 341 361 end 362 342 363 343 364 # SCHEMA STATEMENTS ========================================