Interface SchemaTransformation

All Known Implementing Classes:
AlterKeyspaceStatement, AlterSchemaStatement, AlterTableStatement, AlterTableStatement.AlterColumn, AlterTableStatement.MaskColumn, AlterTypeStatement, AlterViewStatement, CreateAggregateStatement, CreateFunctionStatement, CreateIndexStatement, CreateKeyspaceStatement, CreateTableStatement, CreateTriggerStatement, CreateTypeStatement, CreateViewStatement, DropAggregateStatement, DropFunctionStatement, DropIndexStatement, DropKeyspaceStatement, DropTableStatement, DropTriggerStatement, DropTypeStatement, DropViewStatement

public interface SchemaTransformation
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The result of applying (on this node) a given schema transformation.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Keyspaces schema)
    Apply a statement transformation to a schema snapshot.
    default Optional<Long>
    If the transformation should be applied with a certain timestamp, this method should be overriden.
  • Method Details

    • apply

      Keyspaces apply(Keyspaces schema)
      Apply a statement transformation to a schema snapshot.

      Implementing methods should be side-effect free (outside of throwing exceptions if the transformation cannot be successfully applied to the provided schema).

      Parameters:
      schema - Keyspaces to base the transformation on
      Returns:
      Keyspaces transformed by the statement
    • fixedTimestampMicros

      default Optional<Long> fixedTimestampMicros()
      If the transformation should be applied with a certain timestamp, this method should be overriden. This is used by SchemaTransformations.updateSystemKeyspace(KeyspaceMetadata, long) when we need to set the fixed timestamp in order to preserve user settings.