/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a * UDT key type. * * <p>Example: * * <pre> * addUDTMapColumn("roles", frozen("user"), DataType.text()); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link * SchemaBuilder#frozen(String)}. * @param valueType the value raw type of the column to be added. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, DataType valueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(valueType, "Map value type"); validateNotKeyWord( columnName, String.format( "The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKey(udtKeyType, valueType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a UDT key type. * <p/> * Example: * <pre> * addUDTMapColumn("roles", frozen("user"), DataType.text()); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @param valueType the value raw type of the column to be added. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, DataType valueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(valueType, "Map value type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKey(udtKeyType, valueType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a UDT key type. * <p/> * Example: * <pre> * addUDTMapColumn("roles", frozen("user"), DataType.text()); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @param valueType the value raw type of the column to be added. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, DataType valueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(valueType, "Map value type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKey(udtKeyType, valueType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with a UDT key type. * <p/> * Example: * <pre> * addUDTMapColumn("roles", frozen("user"), DataType.text()); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @param valueType the value raw type of the column to be added. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, DataType valueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(valueType, "Map value type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKey(udtKeyType, valueType)); return self; }