blob method

void blob(
  1. String name, {
  2. bool nullable = false,
  3. bool unique = false,
  4. Uint8List? defaultValue,
  5. String? check,
})

Add a blob column

Implementation

void blob(
  String name, {
  bool nullable = false,
  bool unique = false,
  Uint8List? defaultValue,
  String? check,
}) {
  var q = "$name BLOB";
  if (unique) {
    q += " UNIQUE";
  }
  if (!nullable) {
    q += " NOT NULL";
  }
  if (defaultValue != null) {
    q += " DEFAULT $defaultValue";
  }
  if (check != null) {
    q += " CHECK($check)";
  }
  _columns.add(q);
  _columnsData.add(DbColumn(
      name: name,
      unique: unique,
      nullable: nullable,
      defaultValue: "$defaultValue",
      check: check,
      type: DbColumnType.blob));
}