Package com.illumon.iris.db.schema
Interface MutableSchema
- All Superinterfaces:
com.fishlib.base.log.LogOutputAppendable,Schema,Serializable,TableDefinitionSchema
A schema that can be mutated.
This is really a prototype schema, in practice generated from element or table definition.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.schema.Schema
Schema.AbstractSchema, Schema.Delegating -
Method Summary
Modifier and TypeMethodDescription@NotNull MutableSchemaremoveColumn(@NotNull String columnName) Removes a column from thisMutableSchema.@NotNull MutableSchemarenameColumn(@NotNull String oldName, @NotNull String newName) Renames a column in thisMutableSchema.@NotNull MutableSchemasetColumnType(@NotNull String columnName, @NotNull Class<?> columnType) Sets the datatype of a column in thisMutableSchema.setDataIndexSets(@NotNull List<String[]> dataIndexSets) setExtendedStorage(@Nullable ExtendedStorage extendedStorage) Set the ExtendedStorage type.setInputTableStateSpec(@NotNull InputTableStateSpec inputTableStateSpec) Accepts an input table specification and applies it to the schema appropriately.setNamespace(@NotNull String namespace) setNamespaceSet(@NotNull NamespaceSet set) setPartitionKeyFormula(@NotNull String formula) setStorageType(int storageType) setTableName(@NotNull String tableName) Methods inherited from interface com.illumon.iris.db.schema.Schema
getAttributes, getAttributeValue, getDataIndexSets, getExtendedStorage, getImmutable, getImportSource, getImportSources, getImportSources, getInputTableStateSpec, getListeners, getLogFormats, getLoggers, getMutable, getPartitionKeyFormula, getValidator, hasListeners, hasLoggersMethods inherited from interface com.illumon.iris.db.schema.TableDefinitionSchema
append, getColumnDescriptions, getDefaultMergeFormat, getMergeCodecName, getNamespace, getNamespaceSet, getStorageType, getTableDefinition, getTableDescription, getTableName, getTableType, getTableTypeV2, getVersion
-
Method Details
-
setNamespace
-
setTableName
-
setNamespaceSet
-
setStorageType
-
setExtendedStorage
Set the ExtendedStorage type. Note that this only makes sense if storageType is set to ExtendedStorage.- Parameters:
extendedStorage- the extended storage type string. If null, The extendedStorage will be removed.- Returns:
- this, for chaining
-
setPartitionKeyFormula
-
removeColumn
Removes a column from thisMutableSchema. The column will also be removed from Logger/Listener sections and ImportSources.- Parameters:
columnName- The column to be removed.- Returns:
- A
MutableSchemawith the matching column removed. - Throws:
IllegalStateException- if no match is found.
-
renameColumn
@NotNull @NotNull MutableSchema renameColumn(@NotNull @NotNull String oldName, @NotNull @NotNull String newName) Renames a column in thisMutableSchema. The column will also be renamed in Logger/Listener sections and ImportSources.Note that this method does not check for illegal or duplicate new column names. The suitability of the new name should be checked before calling this method.
- Parameters:
oldName- The column to be renamed.newName- The name to be applied when renaming.- Returns:
- A
MutableSchemawith the matching column removed. - Throws:
IllegalStateException- if no match is found.
-
setColumnType
@NotNull @NotNull MutableSchema setColumnType(@NotNull @NotNull String columnName, @NotNull @NotNull Class<?> columnType) Sets the datatype of a column in thisMutableSchema.- Parameters:
columnName- The column to be renamed.columnType- The Class of the datatype to set for the column.- Returns:
- A
MutableSchemawith the matching column removed. - Throws:
IllegalStateException- if no match is found.
-
setDataIndexSets
-
setInputTableStateSpec
Accepts an input table specification and applies it to the schema appropriately.- Parameters:
inputTableStateSpec- The input table specification.- Returns:
- this, for e.g. chaining.
-