<    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
03:15 GitHub57 joined
03:15 <GitHub57> [13sequel] 15gossion opened issue #1314: Can not change(update) record of the '#each' dataset for mssql 02https://git.io/vynoV
03:15 GitHub57 left
03:46 GitHub82 joined
03:46 <GitHub82> [13sequel] 15gossion commented on issue #1314: BTW, I can use "#all" instead of "#each" to avoid this issue. 02https://git.io/vyn6l
03:46 GitHub82 left
04:09 GitHub108 joined
04:09 <GitHub108> [13sequel] 15jeremyevans commented on issue #1314: This is expected behavior, see the documentation: http://sequel.jeremyevans.net/rdoc/classes/Sequel/Dataset.html#method-i-each... 02https://git.io/vyniD
04:09 GitHub108 left
04:09 GitHub6 joined
04:09 <GitHub6> [13sequel] 15jeremyevans closed issue #1314: Can not change(update) record of the '#each' dataset for mssql 02https://git.io/vynoV
04:09 GitHub6 left
04:10 <jeremyevans> scratchcat: If you don't want to use unrestrict_primary_key, you can always call the primary key setter method manually
05:20 scratchcat joined
05:38 aidalgol joined
08:20 haennar joined
09:17 <Bish> hm, how do i copy a model value-wise
09:18 <Bish> i have the problem that i overloaded a setter method for a vallue
09:18 <Bish> and if i do something like model.class.new model.values , this operation happens twice
09:18 <Bish> so i tried model.class.new.instance_eval { @values = model.values; }.save
09:19 <Bish> but that results in the model not getting notified what columns changed
09:20 <Bish> so how do i update a model instance with the values of another model instance, without having setter methods called
09:23 <Bish> hm, i "fixed" this by setting the save parameter change to false
09:51 ta_ joined
10:16 ta_ joined
10:31 haennar joined
12:02 ta_ joined
12:42 badeball joined
12:42 <badeball> does the update method support block syntax like where?
13:11 haennar joined
13:16 <Bish> badeball: now but you can do like .where { id < 3}.update(x:5)
13:16 <Bish> no*
13:16 <Bish> which would be what you want, i think
13:16 <Bish> and we're talking about the dataset method update, not the model class
13:18 <Bish> [2] pry(CPlus)> DB[:test].filter { id < 3 }.update_sql(x:5)
13:18 <Bish> => "UPDATE \"test\" SET \"x\" = 5 WHERE (\"id\" < 3)"
13:19 <Bish> badeball: basicially only .filter,.where,.select support virtual row blocks ( how they are called i think ), but you can do anything with them
13:20 haennar joined
13:23 <badeball> Bish: alright, thanks!
15:09 glennpratt joined
15:22 <Bish> hm, can i make destroy not use transactions.. even while model.use_transactions is true
15:22 <Bish> my wacky sharding implementation doesn't work with that :D and i seem to be unable to write a fix
15:24 <Bish> i tried Sequel.synchronize { self.use_transactions = false; something; self.use_transactions = true;} but that gives me deadlocking
15:29 <Bish> looks like only save can do that :(
15:39 glennpratt joined
17:37 eregon_ joined
18:17 <jeremyevans> Bish: model.values.merge!(other_model.values)
18:18 <jeremyevans> Bish: destroy should respect :transaction=>false option or use_transactions setting
18:59 scratchcat joined
19:24 ta_ joined
22:07 brybeecher joined