Always use master server inside a transaction

2017-06-20 Thread Mark Allen
Hello, I'm getting race conditions which seems to be caused by read replicas. Is there a way to configure Sequel to always use the master server inside a DB.transaction block? I know there exists DB.with_server, but I'm hoping to avoid updating our entire codebase, and having to remember to

Re: Add SQL comments in migrations

2021-03-02 Thread Mark Allen
. Thank you! On Fri, Feb 26, 2021 at 3:32 PM Mark Allen wrote: > Yep that does it. Had to make some broader changes since > DB.extension(:pg_comment) was invoked outside of migrations since it has > non-migration methods, such as DB.comment_for(:users__dob), to return the > comment f

Re: Add SQL comments in migrations

2021-02-26 Thread Mark Allen
k/CADGZSSfRDxZnNfZ%2BtVk%3DHduQBzJqYLr0U%3DAavFLg1aH38nP_6w%40mail.gmail.com > <https://groups.google.com/d/msgid/sequel-talk/CADGZSSfRDxZnNfZ%2BtVk%3DHduQBzJqYLr0U%3DAavFLg1aH38nP_6w%40mail.gmail.com?utm_medium=email_source=footer> > . > -- *Mark Allen, *Vice President, Engineering, Vydia,

Re: Add SQL comments in migrations

2021-02-26 Thread Mark Allen
::MigrationReverser) class Sequel::MigrationReverser private def comment_on(*args) @actions << [:comment_on, *args[0...-1], nil] end end end On Fri, Feb 26, 2021 at 1:25 PM Jeremy Evans wrote: > On Fri, Feb 26, 2021 at 10:10 AM Mark Allen wrote: > >> The main thing missing in th

Re: Add SQL comments in migrations

2021-03-02 Thread Mark Allen
Thanks Jeremy, I just opened up https://github.com/jeremyevans/sequel-annotate/pull/21 On Tue, Mar 2, 2021 at 2:39 PM Jeremy Evans wrote: > On Tue, Mar 2, 2021 at 10:44 AM Mark Allen wrote: > >> Jeremy, I noticed that column comments show up in the annotations from >> sequel-

Re: Add SQL comments in migrations

2021-03-03 Thread Mark Allen
m/jeremyevans/sequel-annotate/pull/21 >> >> On Tue, Mar 2, 2021 at 2:39 PM Jeremy Evans wrote: >> >>> On Tue, Mar 2, 2021 at 10:44 AM Mark Allen wrote: >>> >>>> Jeremy, I noticed that column comments show up in the annotations from >>>> se

Re: Add SQL comments in migrations

2021-02-26 Thread Mark Allen
because of this condition if defined?(Sequel::MigrationReverser) On Fri, Feb 26, 2021 at 1:52 PM Mark Allen wrote: > Perfect, I found this in pg_enum extension > https://github.com/jeremyevans/sequel/blob/c24909f5182d633673c9e8d78813c24f0a4bbb88/lib/sequel/extensions/pg_enum.rb#L185-L197 >

Re: Add SQL comments in migrations

2021-02-26 Thread Mark Allen
Jeremy Evans wrote: > On Fri, Feb 26, 2021 at 11:13 AM Mark Allen wrote: > >> Spoke a little too soon, when I move the previous code from inline @ the >> top of my migration file, into the actual gem, there's what I assume is a >> load-order issue. Seems like the ge

Count the number of DB operations within a block

2022-06-24 Thread Mark Allen
Hi, I want to count the number of DB operations within a block. Can't find any documentation how to do this. Found DB.extend_datasets which looks promising but can't find a way to UN-extend_dataset after. Thoughts? -- You received this message because you are subscribed to the Google Groups

Re: Count the number of DB operations within a block

2022-06-24 Thread Mark Allen
Specifically, I'm trying to do this exact thing, but with Sequel instead of ActiveRecord https://github.com/rmosolgo/graphql-ruby/blob/master/guides/dataloader/testing.md#testing-dataloader-sources On Friday, June 24, 2022 at 4:22:29 PM UTC-4 Mark Allen wrote: > Hi, I want to count the num