decimal method

SchemaUtils decimal(
  1. String name, {
  2. int precision = 10,
  3. int scale = 2,
})

Add a decimal column

Creates a real column for precise decimal numbers. Returns a SchemaUtils instance for adding constraints.

Implementation

SchemaUtils decimal(String name, {int precision = 10, int scale = 2}) {
  final column = SchemaUtils(" $name DECIMAL($precision,$scale) ");
  _columns[name] = column;
  return column;
}