Sha256: 68dc68803e5fc1aa39c31b18799ee7a3d0cfbbc4ebaef189cc3fc796739cef03

Contents?: true

Size: 1.11 KB

Versions: 14

Compression:

Stored size: 1.11 KB

Contents

module ArJdbc
  module Tasks

    def self.register_tasks(pattern, task)
      ActiveRecord::Tasks::DatabaseTasks.register_task(pattern, task)
    end

    # support adapter: mariadb (as if it were mysql)
    register_tasks(/mariadb/, ActiveRecord::Tasks::MySQLDatabaseTasks)

    require 'arjdbc/tasks/jdbc_database_tasks'
    #require 'arjdbc/tasks/db2_database_tasks'
    #require 'arjdbc/tasks/derby_database_tasks'
    #require 'arjdbc/tasks/h2_database_tasks'
    #require 'arjdbc/tasks/hsqldb_database_tasks'
    #require 'arjdbc/tasks/mssql_database_tasks'

    # re-invent built-in (but deprecated on 4.0) tasks :
    #register_tasks(/sqlserver/, MSSQLDatabaseTasks)
    #register_tasks(/mssql/, MSSQLDatabaseTasks) # (built-in) alias
    # tasks for custom (JDBC) adapters :
    #register_tasks(/db2/, DB2DatabaseTasks)
    #register_tasks(/derby/, DerbyDatabaseTasks)
    #register_tasks(/h2/, H2DatabaseTasks)
    #register_tasks(/hsqldb/, HSQLDBDatabaseTasks)
    # (default) generic JDBC task :
    register_tasks(/^jdbc$/, JdbcDatabaseTasks)

    # NOTE: no need to register "built-in" adapters such as MySQL

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-51.8-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-50.8-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-51.7-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-50.7-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-51.6-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-50.6-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-51.5-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-50.5-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-51.4-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-50.4-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-51.3-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-50.3-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-51.2-java lib/arjdbc/tasks/database_tasks.rb
activerecord-jdbc-adapter-50.2-java lib/arjdbc/tasks/database_tasks.rb