Sequel 4.38.0 Released

2016-09-01 Thread Jeremy Evans
Sequel 4.38.0 has been released! = New Features * Sequel::SQL::NumericMethods#coerce has been added, which adds support for ruby's coercion protocol when performing numeric operations. Previously, Sequel supported code like: Sequel.expr{a - 1} This is because a in this case returns

Changing behaviour of regex filters for adapter

2016-09-01 Thread Eric Schwartz
I'm working on updating a Sequel adapter (sequel-vertica) for my own nefarious purposes (actually, I'm adding support for COPY FROM STDIN), and I am running across a problem trying to get all the existing tests to pass. It seems that when Sequel sees a dataset filter like: @ds.filter(name:

Re: Transactions and paged_each

2016-09-01 Thread Trevor Turk
On Thursday, September 1, 2016 at 1:20:21 AM UTC-5, Jeremy Evans wrote: > > Dataset#paged_each shouldn't lock the entire table, as it just selects > rows, but the behavior in regards to locking depends on the database. It > would probably be best for you to try it in a test environment to be

Re: "delay_add_association" plugin and one_to_one relationship

2016-09-01 Thread David Espada
2016-09-01 10:51 GMT+02:00 David Espada : > I have tested and it doesn't wotk :( > Ouch! Now I understand that your example is not generic code, but a redefinition of specific association code. Sorry :) -- David -- You received this message because you are subscribed to the

Re: "delay_add_association" plugin and one_to_one relationship

2016-09-01 Thread David Espada
2016-09-01 10:34 GMT+02:00 David Espada : > > 2016-08-31 18:40 GMT+02:00 Jeremy Evans : > >> plugin :instance_hooks >> >> def association=(v) >> after_save_hook{super} >> end >> > > I'll try it. Thank you very much. > I have tested and it

Re: "delay_add_association" plugin and one_to_one relationship

2016-09-01 Thread David Espada
2016-08-31 18:40 GMT+02:00 Jeremy Evans : > That's certainly not the behavior of delay_add_association in the *_many > association case, so it wouldn't make sense for it to be the default in the > one_to_one case. If you want that behavior, you can probably write your >

Re: Transactions and paged_each

2016-09-01 Thread Jeremy Evans
On Wednesday, August 31, 2016 at 9:47:52 PM UTC-7, Trevor Turk wrote: > > Hello, > > I've been reading about paged_each and it seems to work well in my > testing, but I'm concerned about using it in production because the > documentation says it uses a transaction internally. > > I plan to make