solnic on main
Switch to peaceiris/actions-gh-… (compare)
solnic on main
Remove GA (compare)
dependabot[bot] on bundler
Bump rack from 2.2.3 to 2.2.3.1… (compare)
dependabot[bot] on bundler
dependabot[bot] on bundler
Bump nokogiri from 1.11.4 to 1.… (compare)
and
def [](id)
...
end
user[12] # => is like user.find_by_id(12)
[6] pry(main)> add = -> (a,b) { a + b}
=> #<Proc:0x00005567f9a1eee0@(pry):6 (lambda)>
[8] pry(main)> add.call(1,2)
=> 3
[9] pry(main)> add.(1,2)
=> 3
[10] pry(main)> add[1,2]
=> 3
I have a question here. Basically I have three tables and need to left-join two of them. SQL here MySQL [account]> select email,role,main_email from users left join tenants_users on (tenants_users.user_uuid = users.uuid) left join tenants on (tenants.main_email = users.email);
.
I got this instead,
[86] pry(main)> db.from(:users).select(:email).left_join(:tenants_users, user_uuid: :uuid).select_append(:role).left_join(:tenants, main_email: :email)
=> #<Sequel::Mysql2::Dataset: "SELECT `email`, `role` FROM `users` LEFT JOIN `tenants_users` ON (`tenants_users`.`user_uuid` = `users`.`uuid`) LEFT JOIN `tenants` ON (`tenants`.`main_email` = `tenants_users`.`email`)">
I like to replace tenants_users.email
with users.email
.
left join tenants on (users.email = tenants.main_email)
???
countries_repositories.aggregate(region: :region)
gets the first two layers but not below that
people.select(:name).where { ltree_tags.match_any(['Bottom', 'Bottom.Cities.*']) }
:)