Package com.illumon.iris.db.schema
Interface MutableSchema
- All Superinterfaces:
com.fishlib.base.log.LogOutputAppendable
,Schema
,Serializable
,TableDefinitionSchema
public interface MutableSchema extends Schema
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 Type Method Description MutableSchema
removeColumn(String columnName)
Removes a column from thisMutableSchema
.MutableSchema
renameColumn(String oldName, String newName)
Renames a column in thisMutableSchema
.MutableSchema
setColumnType(String columnName, Class<?> columnType)
Sets the datatype of a column in thisMutableSchema
.MutableSchema
setDataIndexSets(List<String[]> dataIndexSets)
MutableSchema
setNamespace(String namespace)
MutableSchema
setNamespaceSet(NamespaceSet set)
MutableSchema
setPartitionKeyFormula(String formula)
MutableSchema
setStorageType(int storageType)
MutableSchema
setTableName(String tableName)
Methods inherited from interface com.illumon.iris.db.schema.Schema
getAttributes, getAttributeValue, getDataIndexSets, getImmutable, getImportSource, getImportSources, getImportSources, getListeners, getLoggers, getMutable, getPartitionKeyFormula, getValidator, hasListeners, hasLoggers
Methods inherited from interface com.illumon.iris.db.schema.TableDefinitionSchema
append, getColumnDescriptions, getDefaultMergeFormat, getMergeCodecName, getNamespace, getNamespaceSet, getTableDefinition, getTableDescription, getTableName, getTableType, getVersion
-
Method Details
-
setNamespace
-
setTableName
-
setNamespaceSet
-
setStorageType
-
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
MutableSchema
with the matching column removed. - Throws:
IllegalStateException
- if no match is found.
-
renameColumn
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
MutableSchema
with the matching column removed. - Throws:
IllegalStateException
- if no match is found.
-
setColumnType
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
MutableSchema
with the matching column removed. - Throws:
IllegalStateException
- if no match is found.
-
setDataIndexSets
-