class GroongaSchema::Diff

Attributes

added_columns[R]
added_plugins[R]
added_tables[R]
changed_columns[R]
changed_tables[R]
removed_columns[R]
removed_plugins[R]
removed_tables[R]

Public Class Methods

new() click to toggle source
# File lib/groonga-schema/diff.rb, line 29
def initialize
  @removed_plugins = []
  @added_plugins = []

  @removed_tables = {}
  @added_tables = {}
  @changed_tables = {}

  @removed_columns = {}
  @added_columns = {}
  @changed_columns = {}
end

Public Instance Methods

==(other) click to toggle source
# File lib/groonga-schema/diff.rb, line 42
def ==(other)
  return false unless other.is_a?(self.class)

  @removed_plugins == other.removed_plugins and
    @added_plugins == other.added_plugins and
    @removed_tables == other.removed_tables and
    @added_tables == other.added_tables and
    @changed_tables == other.changed_tables and
    @removed_columns == other.removed_columns and
    @added_columns == other.added_columns and
    @changed_columns == other.changed_columns
end
same?() click to toggle source
# File lib/groonga-schema/diff.rb, line 55
def same?
  @removed_plugins.empty? and
    @added_plugins.empty? and
    @removed_tables.empty? and
    @added_tables.empty? and
    @changed_tables.empty? and
    @removed_columns.empty? and
    @added_columns.empty? and
    @changed_columns.empty?
end
to_groonga_command_list(options={}) click to toggle source
# File lib/groonga-schema/diff.rb, line 66
def to_groonga_command_list(options={})
  converter = GroongaCommandListConverter.new(self, options)
  converter.convert
end