Alex Fedorov
Alex Fedorov
As discussed off-line, we shouldn't normally do that, because users might pipe script input into this command and then re-establishing a connection silently might be a bad idea. I think,...
Yes. It is possible to detect if the process is running in the interactive or pipe mode. PoC of such detection mechanism can be found in this 'git compare': https://github.com/andreasf/cf-mysql-plugin/compare/master...waterlink:poc-interactivity-detection
Not very active at the very least. Lots of stuff on my plate. If you want to pick it up, that should be possible to arrange. On Thu 12. Oct...
@elorest Most probably the problem originates from crystal-mysql library.
@matti Which database adapter are you using? And which version of the `active_record` and the adapter ?
Yeah currently functionality is very basic. If you want you can try to create a PR for that. I can guide you through current codebase if you want to do...
First we need to decide on the interface. Which args should join receive? What will it return?
So I imagine something along these lines: ``` crystal class Model # args map directly to 'JOIN #{table_name} ON #{on_query}' def join(model_klass, on_query : Hash|Query) : JoinedModels end ``` And...
Maybe every model could have something like this: ``` crystal posts = Post.join(User, criteria("posts.author_id") == criteria("users.id")).all post = posts.first post.title # => "Hello world post" user = User.from_joined(post) user.name #...
Other way to do it is to define all such possible relationships beforehand (aka `belongs_to` and `has_one` and `has_many`): ``` crystal class Post < ActiveRecord::Model belongs_to User end posts =...