<    March 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 _2_5  
26 27 28 29 30 31
00:04 filterfish joined
01:46 aidalgol joined
01:51 <adam12> jeremyevans: I'm having a bit of an issue understanding virtual rows, the Sequel qualifying method, and the `SUM` function.
01:52 <adam12> I'm going to put together some code to share, but basically, join(:some_table).select { |o| sum of some_table.column }
01:53 <adam12> Actually you know what, I had it figured out, but since I didn't name the value, it looked like the code wasn' being evaluated.
03:04 <adam12> jeremyevans: Still fighting this issue - hoping for some guidance from you if possible.
03:04 <adam12> Here's a reproducible blob: https://gist.github.com/3d5f391ca95cce77f2387d37d0821bd6
03:05 <adam12> First problem - it works with sqlite in memory adapter, but not on Postgres actual development system. Everything looks like it should. Can you think of any reason why? Maybe the query generated?
03:06 <adam12> Second - does this look right in terms of Sequel? better way? improvements?
03:08 <adam12> Jeez - not my night today. Forget about #1. Passing in a postgres adapter to sequel bin, and everything is dandy.
03:10 <adam12> eh, model version is still messed up. If you get a chance, I'll update the gist and if you have a chance to look at it, much thanks.
04:06 glennpratt joined
04:27 glennpratt joined
04:53 claw joined
20:25 <jeremyevans> adam12: for model.rb, no need to have multiple virtual rows (with both o and p)
20:30 <jeremyevans> adam12: you could DRY it up a bit via http://pastebin.com/VrGiSZ9W
21:21 <adam12> jeremyevans: Thanks. I ended up doing it a very weird way in the end - a SELECT FROM (SELECT )
21:22 <adam12> Because I had nothing but problems with the other methods. Postgres was complaining about aggregation functions, Sqlite didn't like the Window function.
21:24 <adam12> jeremyevans: https://gist.github.com/adam12/c150d44e52bdec92c4ab11b6b2d2b4b1 :\
21:24 <adam12> I need to figure out a bit more advanced SQL I think. Do you have a preferred reference?
22:17 ta_ joined