create method

Future<void> create(
  1. String name,
  2. void callback(
    1. Blueprint table
    )
)

Creates a new table with the given name using the callback to define columns.

Implementation

Future<void> create(String name, void Function(Blueprint table) callback) async {
  final blueprint = Blueprint(name);
  callback(blueprint);
  await _db.query(blueprint._toCreateSql());
}