Class: GroongaDelta::LocalDelta::TableTarget
- Inherits:
-
Object
- Object
- GroongaDelta::LocalDelta::TableTarget
- Includes:
- ApplyLoggable
- Defined in:
- lib/groonga-delta/local-delta.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #apply(logger, client, processor) ⇒ Object
-
#initialize(path, timestamp, name, action) ⇒ TableTarget
constructor
A new instance of TableTarget.
Constructor Details
#initialize(path, timestamp, name, action) ⇒ TableTarget
Returns a new instance of TableTarget.
294 295 296 297 298 299 |
# File 'lib/groonga-delta/local-delta.rb', line 294 def initialize(path, , name, action) @path = path = @name = name @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
293 294 295 |
# File 'lib/groonga-delta/local-delta.rb', line 293 def action @action end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
292 293 294 |
# File 'lib/groonga-delta/local-delta.rb', line 292 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
290 291 292 |
# File 'lib/groonga-delta/local-delta.rb', line 290 def path @path end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
291 292 293 |
# File 'lib/groonga-delta/local-delta.rb', line 291 def end |
Instance Method Details
#apply(logger, client, processor) ⇒ Object
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/groonga-delta/local-delta.rb', line 301 def apply(logger, client, processor) apply_log(logger, @path) do if @path.end_with?(".grn") processor.load(@path) else # TODO: Add support for @action == "delete" table = Arrow::Table.load(@path) command = Groonga::Command::Load.new(table: @name, values: table, command_version: "3") response = client.load(command.arguments) processor.process_response(response, command) end end end |