addColumn method

BulkInsertBuilder addColumn(
  1. String name,
  2. BulkColumnType colType, {
  3. bool nullable = false,
  4. int maxLen = 0,
})

Adds a column definition to the bulk insert.

The name is the column name. The colType specifies the data type. The nullable flag indicates if the column can contain NULL values. The maxLen specifies the maximum length for variable-length types.

Returns this builder for method chaining.

Implementation

BulkInsertBuilder addColumn(
  String name,
  BulkColumnType colType, {
  bool nullable = false,
  int maxLen = 0,
}) {
  _columns.add(
    BulkColumnSpec(
      name: name,
      colType: colType,
      nullable: nullable,
      maxLen: maxLen,
    ),
  );
  return this;
}