<    April 2017    >
Su Mo Tu We Th Fr Sa  
 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  
01:40 GitHub115 joined
01:40 <GitHub115> [13sequel] 15a0s opened issue #1341: #update_only updates "*only" fields AND modified fields 02https://git.io/vSbq0
01:40 GitHub115 left
01:54 GitHub3 joined
01:54 <GitHub3> [13sequel] 15jeremyevans commented on issue #1341: `update_only` is basically `set_only` followed by `update`, and by design it updates all modified columns after the update, so this isn't a bug. If you only want to modify certain columns, use `set_only` followed by `save(:columns=>[:column1, :column2])`, but be aware that will update `:column1` and `:column2` even if the values haven't changed.... 02https://git.io/vSbmI
01:54 GitHub3 left
01:54 GitHub192 joined
01:54 <GitHub192> [13sequel] 15jeremyevans closed issue #1341: #update_only updates "*only" fields AND modified fields 02https://git.io/vSbq0
01:54 GitHub192 left
02:32 bawigga joined
06:52 jeremyevans joined
09:36 ytti joined
09:36 <ytti> how can i create the DB class after creating the table
09:36 <ytti> like
09:36 <ytti> def create
09:36 <ytti> @db.create_table?(:heis) do
09:36 <ytti> ..
09:36 <ytti> self.class.const_set :Hei, Class.new(Sequel::Model) {}
09:36 <ytti> won't work
09:37 <ytti> i guess the magic does not apply when you use const_set
09:37 <ytti> previously i've just used set_schema inside the class, but that seems to be deprecated
11:27 gloscombe joined
11:47 <badeball> hello, how can I force #group_by to run in ruby land and not create a group by clause in sql?
12:03 <adam12> badeball: Maybe you can call to_a then group_by
12:08 <badeball> adam12: alright, I see
12:08 <badeball> thanks
12:18 <gloscombe> hey guys, is there a clean way to not return some k/v in the .to_hash method from an instance of a Sequel::Model?
12:20 <adam12> gloscombe: can you use Hash#reject ?
12:20 <adam12> or are you looking for cleaner than that?
12:22 <gloscombe> yeah I guess I could do it on the hash, was jsut looking to move it up into the data returned. Ie was trying to strip say uuid / id from a resp without having to do it on the hash (but returning all other values)
12:31 <adam12> Hm.
13:48 ytti left
13:51 pabloh joined
13:51 pabloh_ joined
14:14 banditron joined
14:42 <riddley> so here's a fun one. I have a table called 'releaseStatusCode' that has columns 'id' and 'releaseStatusCodeId' (among others) but Sequel seems to map the value from 'releaseStatsCodeId' to both that label as well as 'id'
14:42 <riddley> this is on 4.29.0
14:42 <riddley> I think the underlying DB is MySQL
14:43 <jeremyevans> riddley: are you doing a join?
14:43 <riddley> no
14:44 <riddley> I am using Sequel::Model
14:44 ytti joined
14:44 <ytti> http://p.ip.fi/6sep - this works
14:44 <ytti> but what is the idiomatic way to first create table, then define the model
14:44 <ytti> (in post set_schema world)
14:45 <riddley> hmm I lied, this amazing table is called tbl_ReleaseStatusCode (in case you don't know it's a table apparently)
14:47 <riddley> jeremyevans, nevermind user error, sorry.
14:48 <jeremyevans> ytti: self.class.const_set(:Hei, Class.new(Sequel::Model(@db[:heis])))
14:48 <ytti> jeremyevans, is the idiomatic way to do this?
14:48 <ytti> i tried (@db) now i feel filly
14:49 <ytti> silly
16:06 <arne_> can i cast an array to an array of another type?
16:06 <arne_> like Sequel.cast(Sequel.pg_array([0.1,0.1,0.1]),:float[])
16:08 <arne_> nevermind.. that just works
17:53 ben_____ joined
20:06 Eiam joined
20:56 ta_ joined
21:33 AYGHOR joined
21:55 <AYGHOR> is it possible to have an model association to a integer value, liek a count?
21:59 <bougyman> a model can represent any dataset
21:59 <bougyman> a count could be part of that dataset
21:59 <bougyman> I'm not sure of your use case here.
22:08 ytti left
23:38 ineb joined