Class: Cequel::Schema::MigrationValidator Private

Inherits:
Object
  • Object
show all
Extended by:
Util::Forwardable
Defined in:
lib/cequel/schema/migration_validator.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This is a utility class to test that it is possible to perform a given table schema migration

Since:

  • 1.0.0

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util::Forwardable

delegate

Constructor Details

#initialize(synchronizer) ⇒ MigrationValidator

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MigrationValidator.

Parameters:

  • synchronizer (TableSynchronizer)

    the synchronizer to validate

Since:

  • 1.0.0



26
27
28
# File 'lib/cequel/schema/migration_validator.rb', line 26

def initialize(synchronizer)
  @synchronizer = synchronizer
end

Class Method Details

.validate!(synchronizer) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Check for various impossible schema changes and raise if any are found

Parameters:

  • synchronizer (TableSynchronizer)

    the synchronizer to validate

Since:

  • 1.0.0



19
20
21
# File 'lib/cequel/schema/migration_validator.rb', line 19

def self.validate!(synchronizer)
  new(synchronizer).validate!
end

Instance Method Details

#validate!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Check for various impossible schema changes and raise if any are found

Raises:

Since:

  • 1.0.0



36
37
38
39
# File 'lib/cequel/schema/migration_validator.rb', line 36

def validate!
  assert_keys_match!
  assert_data_columns_match!
end