[#8070] Cannot create tables with VARCHAR(n) ARRAY types in HSQLDB
This commit is contained in:
parent
e392b4eb65
commit
08f49f04c2
@ -52,7 +52,7 @@ final class ArrayDataType<T> extends DefaultDataType<T[]> {
|
||||
*/
|
||||
private static final long serialVersionUID = 7883229760246533448L;
|
||||
|
||||
private final DataType<T> elementType;
|
||||
final DataType<T> elementType;
|
||||
|
||||
public ArrayDataType(DataType<T> elementType) {
|
||||
super(null, elementType.getArrayType(), elementType.getTypeName(), elementType.getCastTypeName());
|
||||
|
||||
@ -4306,6 +4306,9 @@ final class Tools {
|
||||
}
|
||||
|
||||
static final void toSQLDDLTypeDeclaration(Context<?> ctx, DataType<?> type) {
|
||||
DataType<?> elementType = (type instanceof ArrayDataType)
|
||||
? ((ArrayDataType<?>) type).elementType
|
||||
: type;
|
||||
|
||||
// In some databases, identity is a type, not a flag.
|
||||
if (type.identity()) {
|
||||
@ -4372,7 +4375,9 @@ final class Tools {
|
||||
}
|
||||
|
||||
String typeName = type.getTypeName(ctx.configuration());
|
||||
if (type.hasLength()) {
|
||||
|
||||
// [#8070] Make sure VARCHAR(n) ARRAY types are generated as such in HSQLDB
|
||||
if (type.hasLength() || elementType.hasLength()) {
|
||||
|
||||
// [#6289] [#7191] Some databases don't support lengths on binary types
|
||||
if (type.isBinary() && NO_SUPPORT_BINARY_TYPE_LENGTH.contains(ctx.family()))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user