Method: Ronin::SQL#sql

Defined in:
lib/ronin/sql/sql.rb

#sql {|(statements)| ... } ⇒ StatementList

Creates a new SQL statement list.

Examples:

sql { select(1,2,3,4,id).from(users) }
# => #<Ronin::SQL::StatementList: SELECT (1,2,3,4,id) FROM users>

Yields:

  • ((statements))

    If a block is given, it will be evaluated within the statement list. If the block accepts an argument, the block will be called with the new statement list.

Yield Parameters:

Returns:



55
56
57
# File 'lib/ronin/sql/sql.rb', line 55

def sql(&block)
  StatementList.new(&block)
end