Future<BookData?> findByCode(String code) async { return await (db.select( db.book, )..where((e) => e.code.equals(code))).getSingleOrNull(); }