File: from_block.rb [sequel-4.23.0 Documentation]

Last Modified
  2015-09-06 14:04:39 +0000
Requires

## Description

The from_block extension changes Database#from so that blocks given to it are treated as virtual rows applying to the FROM clause, instead of virtual rows applying to the WHERE clause. This will probably be made the default in the next major version of Sequel.

This makes it easier to use table returning functions:

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

To load the extension into the database:

    DB.extension :from_block