ARRAY<T extends Object> constructor

const ARRAY<T extends Object>({
  1. String? name,
  2. bool primaryKey = false,
  3. bool notNull = false,
  4. bool unique = false,
  5. bool index = false,
  6. String? check,
  7. String? uniqueName,
  8. String? defaultValue,
  9. String? extras,
})

Implementation

const ARRAY({
  super.name,
  super.primaryKey = false,
  super.notNull = false,
  super.unique = false,
  super.index = false,
  super.check,
  super.uniqueName,
  super.defaultValue,
  super.extras,
}) : super(
          type: T == Object
              ? "ARRAY"
              : (T == int || T == BIGINT)
                  ? "BIGINT[]"
                  : (T == double || T == DOUBLE)
                      ? "FLOAT[]"
                      : T == num
                          ? "NUMERIC[]"
                          : (T == bool || T == BOOLEAN)
                              ? "BOOL[]"
                              : (T == String || T == TEXT)
                                  ? "TEXT[]"
                                  : T == BLOB
                                      ? "BYTEA[]"
                                      : T == FLOAT32
                                          ? "REAL[]"
                                          : T == INT32
                                              ? "INTEGER[]"
                                              : "$T[]");