<     May 2017     >
Su Mo Tu We Th Fr Sa  
    1  2  3  4  5  6  
 7  8  9 10 11 12 13  
14 15 16 17 18 19 20  
21 22 23 24 25 26 27  
28 29 30 31
07:15 GitHub169 joined
07:15 <GitHub169> [13sequel] 15perlun commented on issue #1368: > I don't think it makes sense to have a .rubocop.yml file considering that Sequel development doesn't use rubocop.... 02https://git.io/vHCIV
07:15 GitHub169 left
08:29 ta_ joined
10:15 GitHub34 joined
10:15 <GitHub34> [13sequel] 15iamhabbeboy commented on issue #368: This is great, you are so wonderful. You solve my biggest problem 02https://git.io/vHCCu
10:15 GitHub34 left
14:44 jnicklas joined
14:48 <jnicklas> I want to create a foreign key constraint which sets the referenced columns explicitly, rather than just assuming the primary key is referenced. This is possible at lest in postgres with the syntax `ADD CONSTRAINT foo FOREIGN_KEY (source_id, source_type) REFERENCES sources (id, type)`, but I can’t figure out how to specify this in Sequel. Do I need to drop down to raw SQL for this?
14:51 jnicklas joined
15:16 jnicklas joined
15:22 jnicklas joined
15:46 eydaimon joined
15:49 jnicklas joined
15:50 <eydaimon> I have an array of ranges [(8..12), (13..18)] that I wrote a serializer for. However, when tyring to use the serializer, I get: Sequel::Error: can't express 8..12 as a SQL literal. my serializer seems to work fine with a an array. Why not arrays of arrays?
15:55 <eydaimon> "However, if all members of the array are arrays with two members, then the array is treated like a hash:
15:55 <eydaimon> "
15:55 <eydaimon> perhaps that's it
15:55 <eydaimon> can I disable that somehow?
15:56 <eydaimon> instead of a serializer, can I overwrite the getter and setter for just that value?
16:02 GitHub176 joined
16:02 <GitHub176> [13sequel] 15jeremyevans commented on issue #1368: Automated style checkers lead to a focus on how the code looks, as opposed to how it works. Every development tool added is a barrier to contribution. I don't feel the trade off is worth it. 02https://git.io/vHCbo
16:02 GitHub176 left
16:05 <jeremyevans> eydaimon: You have to wrap such arrays in an Sequel::SQL::ValueList so they are not interpreted as condition specifiers, or override Sequel.condition_specifier?
16:07 <eydaimon> so Model.new :field => Sequel::SQL::ValueList([(8..12), (13..18)]) ?
16:20 <eydaimon> I don't know how I can override that one.
16:21 <eydaimon> guess it needed a .new
16:22 <eydaimon> tried that and still got an error
16:22 <eydaimon> Sequel::SQL::ValueList.new([(8..12), (13..18)])
16:26 <eydaimon> there's no hook I can use which happens before that stage in the process?
18:25 <jeremyevans> eydaimon: Possibly Dataset#literal_array_append and Dataset#filter_expr
19:00 <adam12> jeremyevans: Am I wrong to assume `eager :some_name, [list_of_associations]` would work in anonymous usage of Model.dataset_module ?
19:02 <adam12> Actually it does, but it seems to be related to my use of #each at the end of the method chain. Hm.
19:02 <adam12> Looks like eager_each is what I need.
19:04 <adam12> Or just calling `all` before `each`. LOL.
19:25 <Rennex> yeah, it's a shame that you have to remember that "all" yourself, otherwise it'll break and not throw an error
19:26 <Rennex> quite a wart in the API that's otherwise nearing perfection... :)
20:23 jnicklas joined
22:26 claw joined