faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
<FromGitter> <Blacksmoke16> how do you guys handle FK constraints w/o making a query to every table before saving
<FromGitter> <Blacksmoke16> i suppose id be easier to just query every table...
<FromGitter> <drujensen> I usually have a unique index on the foreign key
<FromGitter> <drujensen> is that what you mean?
<FromGitter> <Blacksmoke16> i mean say you go to save a record and a FK constraint fails
<FromGitter> <drujensen> In granite, it will create an error.
<FromGitter> <drujensen> in the errors
<FromGitter> <drujensen> or you can add a validator to check if it exists before adding
<FromGitter> <Blacksmoke16> yea, atm in catching that error, seeing which FK failed, then fixing it
<FromGitter> <Blacksmoke16> hm
<FromGitter> <Blacksmoke16> that might be useful
<FromGitter> <drujensen> but you will still have the possible race condition
<FromGitter> <drujensen> same issue with Rails
<FromGitter> <Blacksmoke16> fair enough
<FromGitter> <Blacksmoke16> i suppose the more responsible thing to would be check if all FKs are valid before saving the record
<FromGitter> <Blacksmoke16> atm i do like
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5c31512626d86e4d563081c9]
<FromGitter> <Blacksmoke16> :p
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5c315294357dd7655d22edc0]
<FromGitter> <Blacksmoke16> yea that reads better
<FromGitter> <Blacksmoke16> few extra queries but meh
_whitelogger has joined #amber
_whitelogger has joined #amber
feepbot has quit [Ping timeout: 258 seconds]
feepbot has joined #amber
_whitelogger has joined #amber
<FromGitter> <valamorgon> can I use amber as my web socket server for my android app? do we have any example?
_whitelogger has joined #amber
<FromGitter> <vifreefly> Question: there is currently no option like ActiveRecord's `dependent:` in Granite. For example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5c31f6084ed182787769edb7]
<FromGitter> <Blacksmoke16> @vifreefly Yes, there is an open issue about that. https://github.com/amberframework/granite/issues/121
<FromGitter> <drujensen> @valamorgon You can generate a socket and channels using `amber g socket name channel1 channel2`. On the android side, you would need to connect to this socket and look for the messages being sent. You can look at the javascript (here)[https://github.com/amberframework/amber/blob/master/assets/js/amber.js] and possibly create an Android library.
<FromGitter> <valamorgon> @drujensen I easily integrated by checking javascript source code like you say, thanks.
<FromGitter> <Blacksmoke16> Default value supports
<FromGitter> <eliasjpr> @drujensen I have completed most of the work needed to solve the Nested params using `schema-validations`. I have added documentation on the readme of the repo https://github.com/eliasjpr/schema-validations
<FromGitter> <eliasjpr> Things left to do: ⏎ ⏎ 1) [ ] Validate nested - When calling `valid?(:nested)` validates sub schemas. ⏎ 2) [ ] Build nested yaml/json- Currently json and yaml do not support the sub schemas. ⏎ 3) [ ] Document Custom Parser for custom types. Currently the library supports parsing to Custom Types, but yet needs to be documented with a working example [https://gitter.im/
<FromGitter> ... amberframework/amber?at=5c325d4057c6883f9b7292d8]
<FromGitter> <Blacksmoke16> https://github.com/amberframework/granite/pull/313 sets array values are `IN` queries in query builder