Aggregate selected data to JSON

2017-04-21 Thread Wojciech Maciejak
Hi! In last days I dive into PostgreSQL JSON functions. There is any way to get exactly the same result in Sequel like in postgresql with statements array_to_json(array_agg(row_to_json(row))) I want to do something like this: SELECT ROWFROM (SELECT organizations.code, organizations.con

Re: Aggregate selected data to JSON

2017-04-25 Thread Wojciech Maciejak
Awesome!!! Thank You, Jeremy! W dniu piątek, 21 kwietnia 2017 16:58:25 UTC+2 użytkownik Jeremy Evans napisał: > > > > On Friday, April 21, 2017 at 7:22:20 AM UTC-7, Wojciech Maciejak wrote: >> >> Hi! In last days I dive into PostgreSQL JSON functions. There is any way &g

SQL position function issue

2017-05-10 Thread Wojciech Maciejak
Hello, Jeremy and community! I have a small issue with *position* function. I created query with small part where { "position(geolocations.path in '#{geolocation}') > 0" } # => WHERE (position(geolocations.path in 'PL.DOL') > 0) It works brilliant, but I wanna did everything which is possible w

AliasedExpression vs OrderedExpression

2018-03-06 Thread Wojciech Maciejak
Hi Jeremy! I'm curious why AliasedExpression doesn't have `desc` and `asc` method like `OrderedExpression`? Maybe I'm don't have right, but aliases in the ORDER BY part, isn't allowed by the standard? -- You received this message because you are subscribed to the Google Groups "sequel-talk" g

Feature request - add possibility of checking if table is joined already

2018-09-14 Thread wojciech . maciejak
Hi Jeremy! I wanted to ask what do you think about the functionality of checking if the table is already joined to dataset. There is a method `#joined_dataset?`, but would be great to have possibility of checking if some, named dataset is already joined. Something like `joined?(:users)` or anyt