mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add a task implementation to delete items
This commit is contained in:
@ -23,6 +23,8 @@ import doobie.implicits._
|
||||
trait OItemSearch[F[_]] {
|
||||
def findItem(id: Ident, collective: Ident): F[Option[ItemData]]
|
||||
|
||||
def findDeleted(collective: Ident, limit: Int): F[Vector[RItem]]
|
||||
|
||||
def findItems(maxNoteLen: Int)(q: Query, batch: Batch): F[Vector[ListItem]]
|
||||
|
||||
/** Same as `findItems` but does more queries per item to find all tags. */
|
||||
@ -145,6 +147,13 @@ object OItemSearch {
|
||||
.toVector
|
||||
}
|
||||
|
||||
def findDeleted(collective: Ident, limit: Int): F[Vector[RItem]] =
|
||||
store
|
||||
.transact(RItem.findDeleted(collective, limit))
|
||||
.take(limit.toLong)
|
||||
.compile
|
||||
.toVector
|
||||
|
||||
def findItemsWithTags(
|
||||
maxNoteLen: Int
|
||||
)(q: Query, batch: Batch): F[Vector[ListItemWithTags]] =
|
||||
|
Reference in New Issue
Block a user