Created
March 8, 2020 16:11
-
-
Save merttoptas/ee781e5883cb75c0244aa7d205f4736f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mport 'package:floor_example/model/Student.dart'; | |
import 'package:floor/floor.dart'; | |
@dao | |
abstract class StudentDao { | |
@Query('SELECT * FROM student WHERE id = :id') | |
Future<Student> findTaskById(int id); | |
@Query('SELECT * FROM student') | |
Future<List<Student>> findAllTasks(); | |
@Query('SELECT * FROM student') | |
Stream<List<Student>> findAllTasksAsStream(); | |
@insert | |
Future<void> insertStudent(Student student); | |
@insert | |
Future<void> insertTasks(List<Student> students); | |
@update | |
Future<void> updateTask(Student student); | |
@update | |
Future<void> updateTasks(List<Student> student); | |
@delete | |
Future<void> deleteTask(Student student); | |
@delete | |
Future<void> deleteTasks(List<Student> students); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment