Class: Groonga::Client::CommandLine::GroongaClient::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga/client/command-line/groonga-client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, options = {}) ⇒ Runner

Returns a new instance of Runner.



150
151
152
153
154
155
156
157
158
159
# File 'lib/groonga/client/command-line/groonga-client.rb', line 150

def initialize(client, options={})
  @client = client
  @split_load_chunk_size = options[:split_load_chunk_size] || 10000
  @generate_request_id   = options[:generate_request_id]
  @target_commands       = options[:target_commands]
  @target_tables         = options[:target_tables]
  @target_columns        = options[:target_columns]
  @load_values = []
  @parser = create_command_parser
end

Instance Method Details

#<<(line) ⇒ Object



161
162
163
# File 'lib/groonga/client/command-line/groonga-client.rb', line 161

def <<(line)
  @parser << line
end

#finishObject



165
166
167
# File 'lib/groonga/client/command-line/groonga-client.rb', line 165

def finish
  @parser.finish
end

#replObject



169
170
171
172
173
174
175
176
177
178
# File 'lib/groonga/client/command-line/groonga-client.rb', line 169

def repl
  begin
    require "readline"
  rescue LoadError
    repl = BareREPL.new(self)
  else
    repl = ReadlineREPL.new(self)
    repl_readline
  end
end