lib/alf/shell/support.rb in alf-shell-0.13.1 vs lib/alf/shell/support.rb in alf-shell-0.14.0
- old
+ new
@@ -1,23 +1,24 @@
module Alf
module Shell
module Support
- def database
- requester && requester.database
+ def connection
+ requester && requester.connection
end
def compiler
- @compiler ||= (database && database.connection.compiler) || Engine::Compiler.new(nil)
+ @compiler ||= (connection && connection.compiler) || Engine::Compiler.new(nil)
end
def operands(argv, size = nil)
operands = [ stdin_operand ] + Array(argv)
operands = operands[(operands.size - size)..-1] if size
operands = operands.map{|arg|
- arg = Algebra.named_operand(arg.to_sym, database) if arg.is_a?(String)
+ arg = connection.relvar(arg) if arg.is_a?(String)
Algebra::Operand.coerce(arg)
}
+ operands
end
def stdin_operand
requester.stdin_operand rescue $stdin
end