insertRow function

Future<void> insertRow(
  1. Connection connection,
  2. String id, {
  3. String? name,
  4. num? age,
  5. num? height,
  6. bool? isStaff,
  7. DateTime? createdAt,
  8. ByteData? profilePicture,
})

Implementation

Future<void> insertRow(
  Connection connection,
  String id, {
  String? name,
  num? age,
  num? height,
  bool? isStaff,
  DateTime? createdAt,
  ByteData? profilePicture,
}) async {
  final cursor = await connection.cursor();
  await cursor.execute(Insert(schema, [
    {
      "id": id,
      "name": name,
      "age": age,
      "height": height,
      "isStaff": isStaff,
      "createdAt": createdAt,
      "profilePicture": profilePicture,
    }
  ]));
  await cursor.close();
}