Module: Sequel::Database::FromBlock

Defined in:
lib/sequel/extensions/from_block.rb

Instance Method Summary collapse

Instance Method Details

#from(*args, &block) ⇒ Object

If a block is given, make it affect the FROM clause:

DB.from{table_function(1)}
# SELECT * FROM table_function(1)


25
26
27
28
29
30
31
# File 'lib/sequel/extensions/from_block.rb', line 25

def from(*args, &block)
  if block
    @default_dataset.from(*args, &block)
  else
    super
  end
end