public class ColumnSpec extends Object
| Constructor and Description |
|---|
ColumnSpec(ColumnSpec from) |
ColumnSpec(String name,
String sqlType,
Map<String,Object> properties) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
ColumnSpec |
merge(Map<String,ModelProperties.PropertyDefn<?>> columnProperties,
ColumnSpec update)
Merges an updated version of this column with an existing version.
|
String |
name() |
Map<String,Object> |
properties() |
String |
sqlType() |
String |
toString() |
void |
validate() |
public ColumnSpec(String name, @Nullable String sqlType, @Nullable Map<String,Object> properties)
public ColumnSpec(ColumnSpec from)
public String name()
public String sqlType()
public void validate()
public ColumnSpec merge(Map<String,ModelProperties.PropertyDefn<?>> columnProperties, ColumnSpec update)
The name cannot be changed (it is what links the existing column and the update). The SQL type will be that provided in the update, if non-null, else the original type. Properties are merged using standard rules: those in the update take precedence. Null values in the update remove the existing property, non-null values update the property. Any properties in the update but not in the existing set, are inserted (if non-null).
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.