Method: Sequel::Dataset#exists
- Defined in:
- lib/sequel/dataset/sql.rb
#exists ⇒ Object
Returns an EXISTS clause for the dataset as an SQL::PlaceholderLiteralString.
DB.select(1).where(DB[:items].exists)
# SELECT 1 WHERE (EXISTS (SELECT * FROM items))
14 15 16 |
# File 'lib/sequel/dataset/sql.rb', line 14 def exists SQL::PlaceholderLiteralString.new(EXISTS, [self], true) end |