Class: Alf::Shell::Explain
- Inherits:
-
Object
- Object
- Alf::Shell::Explain
- Defined in:
- lib/alf/shell/command/explain.rb
Instance Method Summary collapse
Instance Method Details
#compile(argv) ⇒ Object
31 32 33 |
# File 'lib/alf/shell/command/explain.rb', line 31 def compile(argv) operand(argv.shift) end |
#run(argv, requester) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/alf/shell/command/explain.rb', line 13 def run(argv, requester) # set requester and parse options @requester = requester argv = (argv, :split) operand = compile(argv) puts "Logical plan:" puts puts operand.to_ascii_tree.gsub(/^/, " ") puts puts "Physical plan:" puts puts operand.to_cog.to_ascii_tree.gsub(/^/, " ") end |