--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: The purpose of this class is to allow the easy creation of SQL identifiers and functions without relying on methods defined on Symbol. This is useful if another library defines the methods defined by Sequel, or if you are running on ruby 1.9.
- !ruby/struct:SM::Flow::P 
  body: An instance of this class is yielded to the block supplied to filter, order, and select. If the block doesn't take an argument, the block is instance_evaled in the context of a new instance of this class.
- !ruby/struct:SM::Flow::P 
  body: "VirtualRow uses method_missing to return Identifiers, QualifiedIdentifiers, Functions, or WindowFunctions, depending on how it is called. If a block is not given, creates one of the following objects:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Function - returned if any arguments are supplied, using the method name as the function name, and the arguments as the function arguments.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: QualifiedIdentifier - returned if the method name contains __, with the table being the part before __, and the column being the part after.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: Identifier - returned otherwise, using the method name.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "If a block is given, it returns either a Function or WindowFunction, depending on the first argument to the method. Note that the block is currently not called by the code, though this may change in a future version. If the first argument is:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: no arguments given - uses a Function with no arguments.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":* - uses a Function with a literal wildcard argument (*), mostly useful for COUNT."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":distinct - uses a Function that prepends DISTINCT to the rest of the arguments, mostly useful for aggregate functions."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: ":over - uses a WindowFunction. If a second argument is provided, it should be a hash of options which are passed to Window (e.g. :window, :partition, :order, :frame). The arguments to the function itself should be specified as :*=&gt;true for a wildcard, or via the :args option."
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  ds = DB[:t]\n  # Argument yielded to block\n  ds.filter{|r| r.name &lt; 2} # SELECT * FROM t WHERE (name &lt; 2)\n  # Block without argument (instance_eval)\n  ds.filter{name &lt; 2} # SELECT * FROM t WHERE (name &lt; 2)\n  # Qualified identifiers\n  ds.filter{table__column + 1 &lt; 2} # SELECT * FROM t WHERE ((table.column + 1) &lt; 2)\n  # Functions\n  ds.filter{is_active(1, 'arg2')} # SELECT * FROM t WHERE is_active(1, 'arg2')\n  ds.select{version{}} # SELECT version() FROM t\n  ds.select{count(:*){}} # SELECT count(*) FROM t\n  ds.select{count(:distinct, col1){}} # SELECT count(DISTINCT col1) FROM t\n  # Window Functions\n  ds.select{rank(:over){}} # SELECT rank() OVER () FROM t\n  ds.select{count(:over, :*=&gt;true){}} # SELECT count(*) OVER () FROM t\n  ds.select{sum(:over, :args=&gt;col1, :partition=&gt;col2, :order=&gt;col3){}} # SELECT sum(col1) OVER (PARTITION BY col2 ORDER BY col3) FROM t\n"
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: WILDCARD
  value: LiteralString.new('*').freeze
- !ruby/object:RI::Constant 
  comment: 
  name: QUESTION_MARK
  value: LiteralString.new('?').freeze
- !ruby/object:RI::Constant 
  comment: 
  name: COMMA_SEPARATOR
  value: LiteralString.new(', ').freeze
- !ruby/object:RI::Constant 
  comment: 
  name: DOUBLE_UNDERSCORE
  value: "'__'.freeze"
full_name: Sequel::SQL::VirtualRow
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: method_missing
name: VirtualRow
superclass: BasicObject
