activerecord-import icon indicating copy to clipboard operation
activerecord-import copied to clipboard

Support `trilogy` adapter

Open tmimura39 opened this issue 2 years ago • 4 comments

A new MySQL adapter (trilogy) has been introduced to rails. https://github.com/rails/rails/pull/47880

activerecord-import should also support trilogy.

Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.

  • https://github.com/trilogy-libraries/trilogy
  • https://github.com/trilogy-libraries/activerecord-trilogy-adapter

I have verified that the application works correctly with the following code.

require "active_record/connection_adapters/trilogy_adapter"
require "activerecord-import/adapters/mysql2_adapter"

class ActiveRecord::ConnectionAdapters::TrilogyAdapter
  include ActiveRecord::Import::Mysql2Adapter
end

tmimura39 avatar Sep 04 '23 06:09 tmimura39

Any input on PR #811?

jkowens avatar Sep 04 '23 18:09 jkowens

Oops, I missed that pull request.

thanks 👍

tmimura39 avatar Sep 05 '23 01:09 tmimura39

I'm currently trying to figure out how to properly test this change. The changes I have currently on my PR works as is with a rather large Rails application.

When running he mysql test in a Docker container I see the following:

201 runs, 289 assertions, 1 failures, 56 errors, 0 skips
rake aborted!

I still need to investigate why the CI is ❌, but I'll try to identify the issue and report back.

zmariscal avatar Sep 05 '23 03:09 zmariscal

I almost have a 🟢 test running. I discovered a small issue with the Trilogy adapter or composite_primary_keys. Opening a PR against the project to see if I can get that merged. 🤞🏼 I can, after that I can hopefully merge this PR.

zmariscal avatar Sep 06 '23 01:09 zmariscal

I have opened a PR around add trilogy support here

zmariscal avatar Feb 05 '24 15:02 zmariscal

@jkowens with my PR merged now can we close this issue?

zmariscal avatar Feb 05 '24 22:02 zmariscal

Yep 👍

jkowens avatar Feb 07 '24 02:02 jkowens