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:
57 58 59 |
# File 'lib/exwiw/query_ast.rb', line 57 def select_column @select_column end |
#table_name ⇒ Object
Returns the value of attribute table_name
57 58 59 |
# File 'lib/exwiw/query_ast.rb', line 57 def table_name @table_name end |
#where_column ⇒ Object
Returns the value of attribute where_column
57 58 59 |
# File 'lib/exwiw/query_ast.rb', line 57 def where_column @where_column end |
#where_values ⇒ Object
Returns the value of attribute where_values
57 58 59 |
# File 'lib/exwiw/query_ast.rb', line 57 def where_values @where_values end |
Instance Method Details
#to_h ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'lib/exwiw/query_ast.rb', line 58 def to_h { table_name: table_name, select_column: select_column, where_column: where_column, where_values: where_values, } end |