In Sequel there is a #from_self method, which returns a dataset selecting from the current dataset.
https://sequel.jeremyevans.net/rdoc/classes/Sequel/Dataset.html#method-i-from_self
I want to achieve this with rom-rb. Is it possible?
I tried lots of things without success.
I.e.
relation.from_self.select {
[
# sum(total_price).as(:total_price), # sequel dsl
integer::sum(:total_price).as(:total_price), # rom dsl
]
}.map.to_a
Thanks