Module: OracleSqlParser::Grammar::Expression::Case::SimpleCaseExpression2
- Defined in:
- lib/oracle-sql-parser/grammar/expression/case.rb
Instance Method Summary collapse
Instance Method Details
#ast ⇒ Object
166 167 168 169 170 171 |
# File 'lib/oracle-sql-parser/grammar/expression/case.rb', line 166 def ast OracleSqlParser::Ast::SimpleCaseExpression[ :condition => expr.ast, :when_clauses => OracleSqlParser::Ast::Array[*when_clauses] ] end |
#when_clauses ⇒ Object
173 174 175 176 177 178 179 180 |
# File 'lib/oracle-sql-parser/grammar/expression/case.rb', line 173 def when_clauses w.elements.map do |elem| OracleSqlParser::Ast::Hash[ :when_expr => elem.comparison_expr.ast, :return_expr => elem.return_expr.ast ] end end |