class Cassie::Schema::StructureLoader

@deprecated Use {Cassie::Schema::SchemaLoader} instead

Attributes

source_path[R]

Public Class Methods

new(opts={}) click to toggle source
# File lib/cassie/schema/structure_loader.rb, line 8
def initialize(opts={})
  @source_path = opts[:source_path] || default_source_path
end

Public Instance Methods

load() click to toggle source
# File lib/cassie/schema/structure_loader.rb, line 12
def load
  args = ["-f", source_path]
  runner = Cassie::Support::SystemCommand.new("cqlsh", args)

  runner.run
  raise runner.failure_message unless runner.success?
end

Protected Instance Methods

default_source_path() click to toggle source
# File lib/cassie/schema/structure_loader.rb, line 22
def default_source_path
  Cassie::Schema.paths[:schema_file]
end