Skip to content

View with Dao #1687

Answered by ghost
ghost asked this question in Q&A
Feb 16, 2022 · 1 comment
Discussion options

You must be logged in to vote

Okay, I got it. Also, you need to tell the dao what tables you are using for views.

@DriftAccessor(tables: [Contracts, Positions], views: [BookingItems])
class BookingItemsDao extends DatabaseAccessor<AppDatabase> with _$BookingItemsDaoMixin {
  BookingItemsDao(AppDatabase db) : super(db);

// Future<List<BookingItem>> selectAll() => select(bookingItems).get();
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
0 participants