<     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 _2_9 30 31
00:11 <adam12> Anybody using the defaults_setter plugin? What I think should be working isn't. https://gist.github.com/adam12/1b8c12c3a50b4fc4a8a2e6a5884dff87
03:04 <bougyman> jeremyevans: you there?
03:11 <jeremyevans> bougyman: yes
03:12 <bougyman> I noticed https://github.com/jeremyevans/sequel/blob/master/doc/migration.rdoc doesn't have anything about having multiple/alternate migration tables. is that documented somewhere?
03:12 <jeremyevans> adam12: how is that not working? If you call Check#data on a new instance, do you get a JSONBHash?
03:12 <bougyman> If not, can I send you some copy to add to taht page about it?
03:13 <bougyman> I remember asking for it ages ago, and I think I did some PRs about it, but I couldn't find docs on how to use it when I was trying to explain it to someone.
03:13 <bougyman> also might be a good answer for https://laracasts.com/discuss/channels/general-discussion/migration-strategy-for-shared-database-between-multiple-apps?page=1
03:14 <bougyman> (which I found in a google search on 'sequel multi app migrations'
03:14 <jeremyevans> bougyman: http://sequel.jeremyevans.net/rdoc/classes/Sequel/Migrator.html#method-c-run
03:14 <jeremyevans> bougyman: No problem with adding it to the migration guide if it isn't there
03:14 <bougyman> Ok, I'll shoot you a paste when I get time to doc it.
03:15 <bougyman> just paged on a lse @ dayjob.
03:15 <bougyman> (large scale event)
03:15 <bougyman> I hate these things.
03:15 <bougyman> 25 people on a conference call talking over one another.
03:18 <adam12> jeremyevans: It's working now - not sure why. I set a breakpoint inside the lambda and it was never fired.
03:22 <adam12> jeremyevans: Seems to only not work in subclasses.
03:23 <adam12> Check.new.data => proper JSONB hash instance. Check::SubClass.new.data => nil
03:23 <adam12> I suspect this is intentional.
03:40 <jeremyevans> adam12: Maybe not. Looks like it doesn't dup the hash, that should be simple to fix
03:40 <jeremyevans> adam12: so long as you modify default_values before creating the subclass
03:41 <adam12> I do.
03:54 <jeremyevans> adam12: https://pastebin.com/cK2dbV5u
04:30 <adam12> jeremyevans: Applied cleanly and fixed it. Thanks
06:26 aidalgol joined
07:41 GitHub69 joined
07:41 <GitHub69> [13sequel] 15perlun commented on issue #1335: Started here: https://github.com/ecraft/sequel-jdbc-as400... 02https://git.io/v9RQW
07:41 GitHub69 left
08:23 aidalgol joined
08:32 aidalgol joined
08:46 <arne> does sequel run in opal, can i have a model without database?
08:46 <* arne> thinks about writing himself a framework for SPAs with sequel
08:47 <arne> guess not, because it needs db_schema and all, right?
08:49 <* arne> guesses he could proxy it
08:59 <arne> is it stupid though, giving every client information about the schema?
08:59 <badeball> arne: out of curiosity, what are you looking to get from sequel if not having a database?
09:00 <arne> badeball: every logic i have inside a model
09:00 <arne> maybe creating queries
09:01 <arne> for instance: i have a overwritten a setter function of a model, which preprocesses the input
09:01 <arne> same should happen in the client
09:02 <arne> client filters for name: Sequel.ilike(:field,'%something%')
09:02 <arne> that query could be created, send to the server, checked for security there, and executed
09:02 <arne> but thats just coming out of my head right now
09:03 <arne> but mostly: server side validations should be on client, too
09:05 <arne> i was writing apps with sequel for the past year now, and i love it, but i feel like i am reimplementing models on the client side 60% of the time
09:05 <arne> a unified solution would be great, and all existing ones are stupid and/or not sequel-ish
09:05 <arne> playing with this idea in my head for a while now
09:11 <arne> and ultimate goal would be a web-framework which is 100% ruby, which is completely DRY
09:12 <arne> (in good, since stuff like volt etc already exists, but isn't really good in my opinion)
09:12 <arne> i did that, in a proof of concept, only downside i could see was "binary"-size and load time
09:13 <arne> my hello world was ~3mb and took an hour to load
09:13 <arne> but was surprisingly stable, when loaded.
09:14 <arne> sorry for the wall of text
09:16 <badeball> arne: ah, I see. don't have any experience myself with opal, so I can't help with that unfortunately
09:39 <arne> surprisingly good ruby to js source to source compiler
09:39 <arne> never expected it to be that good
09:40 <arne> yay, the shrine gem downloaded a file from amazon aws in an endless loop
09:40 <arne> 5tb
09:40 <arne> 500 bucks down the drain ;; i expected it to cache
10:46 <Rennex> :o
11:23 jhass joined
11:47 brauliobo joined
12:22 <Freaky> arne: I have seen people report getting refunds from similar screwups after contacting support
12:27 <arne> Freaky: oy, that'd be great
12:27 <arne> it's basicially one s3 file gettin downloaded for a month ;;
12:29 <arne> can i have an migration without transaction?
12:31 <arne> PG::ActiveSqlTransaction: ERROR: ALTER TYPE ... ADD cannot run inside a transaction block: (conn: 23373900, server: realm_1) ALTER TYPE... ADD VALUE 'ERROR' BEFORE 'UPLOADING
12:35 <* arne> read the docs now, and knows what to do
12:45 ernlyne joined
12:49 <ernlyne> Hy (again) there. I'm learning using the nested attributes plugin. And for now (after read the docs and others) i'm not able to update one attribute of many nested Bs from a model A (ActiveRecord equivalent : a.bs.update_all(attr: value))
12:50 <ernlyne> Without doing B.where(a_id: whatever_a_instance.id).update(:attr => value)
13:19 ben_____ joined
13:29 ben_____ joined
13:49 <badeball> Hi, I have a question regarding the user of where(foo: [1, 2, … ]). For regular arrays, it seems to create SQL in form of "foo IN (1, 2, … )". However, when given a Sequel::Postgres::PGArray, it creates SQL in the form of "foo = [1, 2, … ]". Is this intended behavior?
13:53 <arne> badeball: i guess so, since an array is a postgres value, which i would expect to be able to be tested for equalit inside sql
13:54 <arne> if you have 2 tables, both having a pgarray of integer, you could certainly join them by that array-column
13:55 <arne> and that would require "table1".array = "table2".array
13:59 <jeremyevans> arne: you could try the mock adapter. However, since strings and symbols are the same in Opal, I'm guessing Sequel wouldn't work well
14:00 <jeremyevans> ernlyne: a.bs_dataset.update(:attr=>value) # though that is dataset level and not model level, so no callbacks/hooks etc
14:00 <jeremyevans> ernlyne: you could do a.bs.each{|b| b.update(attr: value)} # model level
14:01 <jeremyevans> badeball: that is expected. A postgres array is not a value list
14:05 <badeball> jeremyevans, arne: okey, I see. Thanks!
14:33 <arne> jeremyevans: well, even though js has no symbols, :a != "a" in opal, are you talking about performance?
14:34 <arne> i would guess v8 is much quicker than mri, so that wouldn't matter, opal has no mutable strings though
14:37 ben_____ joined
14:53 tercenya joined
15:07 <jeremyevans> arne: Sequel uses mutable strings for query building, and treats symbols differently than strings
15:16 <ernlyne> Thank you jeremyevans. This is what i was looking for
15:40 <arne> oh noes
15:46 tercenya joined
16:02 ifahad7 joined
16:07 <ifahad7> Hi all, I have a question about Sequel::Model mapping to table attribute names.
16:08 <ifahad7> Is there a restriction on table atrribute names? For example, can I name a table attribute "model"?
16:09 tercenya joined
16:09 <ifahad7> I'm asking this because i'm having weird issues whenever the SQL query from sequel contains the attribute name "model"
16:12 <ifahad7> These issues include validate_uniqeness on the attribute name "model" failing and serialization to json results in a stack overflow error only when the attribute "model" is in the dataset
16:13 <ernlyne> What is the best paperclip equivalent for sequel ?
16:15 <jeremyevans> ernlyne: You can try Shrine
16:16 <jeremyevans> ifahad7: try the column_conflicts plugin
16:16 <ifahad7> here's a pastebin of an example https://pastebin.com/g7xfG72C
16:20 <ifahad7> jeremyevans : thanks jeremy!! all is good :)
16:50 tercenya joined
16:57 <ernlyne> jeremyevans: Thank you, I will take a look at it :)
16:58 tercenya joined
17:09 tercenya joined
17:13 GitHub188 joined
17:13 <GitHub188> [13sequel] 15jeremyevans pushed 1 new commit to 06master: 02https://git.io/v9EYC
17:13 <GitHub188> 13sequel/06master 141d06c36 15Jeremy Evans: Make defaults_setter plugin inherit custom default values when subclassing
17:13 GitHub188 left
17:37 brauliobo joined
18:06 ben_____ joined
18:18 tercenya joined
18:37 brauliobo joined
20:53 banditron joined
21:33 Eiam joined
22:11 ben_____ joined
22:19 tercenya joined
22:23 Lyfe_ joined
22:24 mahlon_ joined
22:25 claw_ joined
22:27 Takumo joined
22:27 Takumo joined