Skip to content

Commit

Permalink
Add Support for Mysql2 Proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
stingrayzboy committed Jan 18, 2025
1 parent 99cdf23 commit 64110a6
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
bundle exec rake test:mysql2
bundle exec rake test:mysql2_makara
bundle exec rake test:mysql2spatial
bundle exec rake test:mysql2_proxy
- name: Run tests with postgresql
run: |
bundle exec rake test:postgis
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ADAPTERS = %w(
mysql2
mysql2_makara
mysql2spatial
mysql2_proxy
jdbcmysql
jdbcsqlite3
jdbcpostgresql
Expand Down
1 change: 1 addition & 0 deletions lib/activerecord-import/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def self.base_adapter(adapter)
case adapter
when 'mysql2_makara' then 'mysql2'
when 'mysql2spatial' then 'mysql2'
when 'mysql2_proxy' then 'mysql2'
when 'spatialite' then 'sqlite3'
when 'postgresql_makara' then 'postgresql'
when 'postgresql_proxy' then 'postgresql'
Expand Down
3 changes: 3 additions & 0 deletions test/adapters/mysql2_proxy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

ENV["ARE_DB"] = "mysql2"
3 changes: 3 additions & 0 deletions test/database.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ mysql2spatial:
mysql2_makara:
<<: *mysql2

mysql2_proxy:
<<: *mysql2

postgresql: &postgresql
<<: *common
username: postgres
Expand Down
3 changes: 3 additions & 0 deletions test/github/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ mysql2spatial:
mysql2_makara:
<<: *mysql2

mysql2_proxy:
<<: *mysql2

oracle:
<<: *common
adapter: oracle
Expand Down
6 changes: 6 additions & 0 deletions test/mysql2_proxy/import_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

require File.expand_path("#{File.dirname(__FILE__)}/../test_helper")
require File.expand_path("#{File.dirname(__FILE__)}/../support/mysql/import_examples")

should_support_mysql_import_functionality

0 comments on commit 64110a6

Please sign in to comment.