Module: Relaxo::QueryServer

Defined in:
lib/relaxo/query_server.rb,
lib/relaxo/query_server/shell.rb,
lib/relaxo/query_server/mapper.rb,
lib/relaxo/query_server/context.rb,
lib/relaxo/query_server/library.rb,
lib/relaxo/query_server/process.rb,
lib/relaxo/query_server/reducer.rb,
lib/relaxo/query_server/version.rb,
lib/relaxo/query_server/designer.rb

Defined Under Namespace

Classes: CompilationError, Context, DebugShell, DesignDocument, Designer, InvalidRequestError, Library, ListRenderer, Loader, Mapper, MappingProcess, MockShell, Process, Reducer, ReducingProcess, Shell, ValidationError

Constant Summary collapse

VERSION =
"0.1.5"

Class Method Summary collapse

Class Method Details

.run!(options = {}) ⇒ Object

Run the query server using ‘$stdin` and `$stdout` for communication.



27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/relaxo/query_server.rb', line 27

def self.run!(options = {})
  shell = Shell.new($stdin, $stdout)
  context = Context.new(shell, options)
  
  if options[:debug]
    log = File.open(options[:debug], 'a')
    shell = DebugShell.new(log, shell)
  end
  
  shell.run do |command|
    context.run(command)
  end
end