Thanks Jeremy. I agree, it is a bit niche - we've only found a need for
this as we started doing some large scale data syncs (i.e. ETL). I've
updated my branch to use the mysql shared adapter and PR'd it.

On Fri, 9 Jul 2021 at 00:42, Jeremy Evans <[email protected]> wrote:

> On Wed, Jul 7, 2021 at 11:34 PM Nicholas Spain <
> [email protected]> wrote:
>
>>
>> Hi,
>>
>> At work I've extended the MySQL2 adapter to allow renaming multiple
>> tables in a single statement:
>> https://github.com/nick96/sequel/commit/a0d6c37c23d9ef125b5acaf1d6c6b4271a97db36
>> .
>>
>> I'd like to contribute this back but wanted to check in before submitting
>> a PR as the guidelines request not submitting until the code is ready to be
>> merged. I think this feature could be implemented for some of the other
>> adapters but would require creating a transaction (e.g. Postgres would
>> require multiple ALTER TABLE ... RENAME TO ... statements) which could
>> be surprising as it is papering over the DBMS not having that feature. What
>> is your preference for handling these types of cases?
>>
>
> I think for now it is fine to add it only for MySQL (seems kind of niche
> use case anyway). Your commit looks mostly good, except that instead of
> modifying the mysql and mysql2 adapters, you should modify the mysql shared
> adapter (lib/sequel/adapters/shared/mysql.rb).  That way the support is
> available on any adapter that connects to MySQL, such as the jdbc/mysql
> adapter.
>
> Thanks,
> Jeremy
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sequel-talk" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sequel-talk/sZcHxBca6EY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sequel-talk/CADGZSSc0q-pHTL%2B%2BOosrLeH2M5KQOH2UxCX6Tt4e__p%3Df%3DSy-Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/sequel-talk/CADGZSSc0q-pHTL%2B%2BOosrLeH2M5KQOH2UxCX6Tt4e__p%3Df%3DSy-Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 

*Nicholas Spain*
Junior Software Engineer



*+61415057044*
<+61415057044> <+61+61415057044>
*5 / 128 Exhibition StMelbourne VIC 3000*
<https://goo.gl/maps/xyEUqKqh6WxLprEd8>
*stileeducation.com* <http://www.stileeducation.com>

Stile HQ is located on the traditional lands of the Boon Wurrung and
Woiwurrung (Wurundjeri) peoples of the Kulin Nation. We acknowledge that
sovereignty was never ceded and pay our respects to Elders past, present
and future.
<+61+61415057044>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/CAKeGNNunsw14aQw4SL-ywrCVE3zWyY%3DumuGAo1WL79jWOcX9Bg%40mail.gmail.com.

Reply via email to