Method: Sequel::Dataset#lateral

Defined in:
lib/sequel/dataset/query.rb

#lateralObject

Marks this dataset as a lateral dataset. If used in another dataset’s FROM or JOIN clauses, it will surround the subquery with LATERAL to enable it to deal with previous tables in the query:

DB.from(:a, DB[:b].where(Sequel[:a][:c]=>Sequel[:b][:d]).lateral)
# SELECT * FROM a, LATERAL (SELECT * FROM b WHERE (a.c = b.d))


644
645
646
647
# File 'lib/sequel/dataset/query.rb', line 644

def lateral
  return self if opts[:lateral]
  cached_dataset(:_lateral_ds){clone(:lateral=>true)}
end