Class: Exwiw::QueryAst::Subquery
- Inherits:
-
Struct
- Object
- Struct
- Exwiw::QueryAst::Subquery
- Defined in:
- lib/exwiw/query_ast.rb
Overview
Resolves a set of values on where_column to the rows' select_column
via a nested SELECT. Used as the value of a WhereClause whose operator
is :in_subquery, so a non primary-key ids_field can filter related
tables through the target table's primary key:
81 82 83 |
# File 'lib/exwiw/query_ast.rb', line 81 def select_column @select_column end |
#table_name ⇒ Object
Returns the value of attribute table_name
81 82 83 |
# File 'lib/exwiw/query_ast.rb', line 81 def table_name @table_name end |
#where_column ⇒ Object
Returns the value of attribute where_column
81 82 83 |
# File 'lib/exwiw/query_ast.rb', line 81 def where_column @where_column end |
#where_values ⇒ Object
Returns the value of attribute where_values
81 82 83 |
# File 'lib/exwiw/query_ast.rb', line 81 def where_values @where_values end |
Instance Method Details
#to_h ⇒ Object
82 83 84 85 86 87 88 89 |
# File 'lib/exwiw/query_ast.rb', line 82 def to_h { table_name: table_name, select_column: select_column, where_column: where_column, where_values: where_values, } end |