Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 08:32
    solnic milestoned #411
  • 08:32
    solnic opened #411
  • 08:32
    solnic labeled #411
  • 08:32
    solnic labeled #411
  • May 20 15:51
  • May 20 09:09
    solnic commented #410
  • May 19 18:49
    paddor commented #410
  • May 19 15:20
    flash-gordon commented #410
  • May 19 15:18
    flash-gordon commented #410
  • May 19 12:44
    paddor labeled #410
  • May 19 12:44
    paddor labeled #410
  • May 19 12:44
    paddor opened #410
  • May 18 20:39

    dependabot[bot] on bundler

    (compare)

  • May 18 20:39
    dependabot[bot] closed #341
  • May 18 20:38
    dependabot[bot] commented #341
  • May 18 20:38
    dependabot[bot] labeled #342
  • May 18 20:38
    dependabot[bot] labeled #342
  • May 18 20:38
    dependabot[bot] opened #342
  • May 18 20:38

    dependabot[bot] on bundler

    Bump nokogiri from 1.11.4 to 1.… (compare)

  • May 04 18:28
    jeffmess starred rom-rb/rom-sql
S.Tamiya
@ablce9
ohh, sorry @gotar
Oskar Szrajer
@gotar
Sequel.lit() generally should never be used (all should be achievable in ROM, without calling Sequel directly)
S.Tamiya
@ablce9
Yeah, but this is one time only. The code is meant for a migration.
Nikita Shilnikov
@flash-gordon
I actually write migrations in pure SQL :)
data migrations I mean
S.Tamiya
@ablce9
The project I'm working on generally stores migration file around db/migration . Is that common to write pure SQL when doing migration?
Nikita Shilnikov
@flash-gordon
well, depends on your SQL skills :) Data migrations are kind of one-way anyway and I don't want anything between me and database during the migration. And it's usually faster
personally, I wrote a lot of SQL so this is a non-issue for me
S.Tamiya
@ablce9
I realized it's really tricky converting SQL code into Sequel. and what worse is Sequel is not that supportive I guess? so I come here and ask for helps and people here are really supportive, thanks.
Nikita Shilnikov
@flash-gordon
We discourage from Sequel when possible, our plan is provide people with the tools required for that
Sequel is sort of low level in general and leaks too much SQL related stuff
OTOH migrations is a different beast
esp data migrations
S.Tamiya
@ablce9
gotcha!
Ethan Turkeltaub
@ethnt
Hi guys, another question. I have a recursive relation: a country has many regions, which has many regions. is there a way to recursively get all of the regions of a country?
countries_repositories.aggregate(region: :region) gets the first two layers but not below that
Piotr Solnica
@solnic
@ethnt there's no special feature to cover this. You could write some smart query yourself to get it effectively.
Ethan Turkeltaub
@ethnt
@solnic Good to know, thanks :+1:
Ethan Turkeltaub
@ethnt
@solnic I guess in a similar vein, is there a recommendation for trees in ROM or just use self-referential associations?
Piotr Solnica
@solnic
I used tree extension in PG for that
Ethan Turkeltaub
@ethnt
If only I could use PG 🙃stuck on MySQL
Piotr Solnica
@solnic
@ethnt that's unfortunate, because the implementation in PG was like few lines of code, I really liked it
we even have a special type for ltree: https://github.com/rom-rb/rom-sql/blob/master/lib/rom/sql/extensions/postgres/types/ltree.rb it gives you custom API for queries like people.select(:name).where { ltree_tags.match_any(['Bottom', 'Bottom.Cities.*']) } :)
Mihai Radulescu
@mihairadulescu
hey guys did anyone experienced lately MySql connection has Gone away when using rom.rb in Aurora Db Mysql ?
Nikita Shilnikov
@flash-gordon
I don't think this kind of issues could be directly related to rom, although it's possible databases close connections after a certain timeout. I know that Sequel has a workaround for that and I'm pretty it sure you can use it with rom
assuming my guess is right ofc
Mihai Radulescu
@mihairadulescu
already have that connection validator in place.
Nikita Shilnikov
@flash-gordon
huh
so in any case I would look deeper, maybe search through sequel's issues for advice
or ask Jeremy on the google groups
Mihai Radulescu
@mihairadulescu
yeah will check into sequel groups
Dawid Lenkiewicz
@dawidlenkiewicz
Hey is it possible to write this query without directly calling Sequel?
collection = collection.where { Sequel.|(*search_params.horsepower_ranges_map) }
this search_params.horsepower_ranges_map returns array of hashes like: [ { horsepower: 100..200 }, { horsepower: 500..600} ]
Viet (Drake) Tran
@tiev
@solnic Does rom-roda work with Rom v4?
Viet (Drake) Tran
@tiev
I've tried rom-roda with rom v4 and failed. Do you think the interface of rom-roda should change? Can I contribute to make it work with rom v4?
Vasily Kolesnikov
@v-kolesnikov
@tiev rom-roda looks outdated. But there isn't much sense to use this plugin. You can use rom and roda together without any additional libraries. For example: https://github.com/v-kolesnikov/elias/tree/feature/api_v1
Viet (Drake) Tran
@tiev
ah, it's dry-web-roda
it is promising
Tim Riley
@timriley
dry-web-roda has been retired, @tiev, so we won’t be updating it.
You’ll probably just want to update your app’s rom integration yourself, making whatever changes are required
Oskar Szrajer
@gotar
@tiev I'm using dry-web-roda, and it's working with ROM 4
I just made few changes to make it works
Piotr Solnica
@solnic
@tiev there's no need for rom-roda, I need to delete this repo. if you want to use rom + roda it's better to either set it up yourself or use dry-web-roda
Viet (Drake) Tran
@tiev
Thanks all.
Viet (Drake) Tran
@tiev
Hi Tim. I like functional oop architecture. Any specific problems that dry-web-roda gets retired?
Piotr Solnica
@solnic
@tiev we've started helping with Hanami and this is where our focus will be, not dry-web-roda. The plan is to make Hanami 2.0 work nicely with dry-rb, its alpha version already supports dry-system. We'll improve other integrations, like dry-validation, dry-view etc. too.
Dawid Lenkiewicz
@dawidlenkiewicz
Hey I've got a query that uses distinct on + order notation. It works well, but in the end I want to order results by some attribute and it looks like initial ordering is overwritten