Sha256: 621fb94762da0ab479393e66ac5f05df74c69aaef92e775b5148966f4372daf9

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

ArJdbc::ConnectionMethods.module_eval do
  def firebird_connection(config)
    config[:adapter_spec] ||= ::ArJdbc::Firebird
    config[:adapter_class] = ActiveRecord::ConnectionAdapters::FirebirdAdapter unless config.key?(:adapter_class)

    return jndi_connection(config) if jndi_config?(config)

    config[:driver] ||= 'org.firebirdsql.jdbc.FBDriver'
    ArJdbc.load_driver(:Firebird) unless config[:load_driver] == false

    config[:host] ||= 'localhost'
    config[:port] ||= 3050
    config[:url] ||= begin
      "jdbc:firebirdsql://#{config[:host]}:#{config[:port]}/#{config[:database]}"
    end

    jdbc_connection(config)
  end
  # alias_method :jdbcfirebird_connection, :firebird_connection
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-ficoh-1.3.21-java lib/arjdbc/firebird/connection_methods.rb