Adopt backend to collective-id

This commit is contained in:
eikek
2022-08-04 11:03:27 +02:00
parent 26d7c91266
commit 53d92c4a26
94 changed files with 1468 additions and 833 deletions

View File

@ -67,7 +67,7 @@ trait FtsClient[F[_]] {
def updateItemName(
logger: Logger[F],
itemId: Ident,
collective: Ident,
collective: CollectiveId,
language: Language,
name: String
): F[Unit] =
@ -79,7 +79,7 @@ trait FtsClient[F[_]] {
def updateItemNotes(
logger: Logger[F],
itemId: Ident,
collective: Ident,
collective: CollectiveId,
language: Language,
notes: Option[String]
): F[Unit] =
@ -92,7 +92,7 @@ trait FtsClient[F[_]] {
logger: Logger[F],
itemId: Ident,
attachId: Ident,
collective: Ident,
collective: CollectiveId,
language: Language,
name: Option[String]
): F[Unit] =
@ -112,7 +112,7 @@ trait FtsClient[F[_]] {
def updateFolder(
logger: Logger[F],
itemId: Ident,
collective: Ident,
collective: CollectiveId,
folder: Option[Ident]
): F[Unit]
@ -124,7 +124,7 @@ trait FtsClient[F[_]] {
def clearAll(logger: Logger[F]): F[Unit]
/** Clears the index from all data belonging to the given collective. */
def clear(logger: Logger[F], collective: Ident): F[Unit]
def clear(logger: Logger[F], collective: CollectiveId): F[Unit]
}
@ -149,7 +149,7 @@ object FtsClient {
def updateFolder(
logger: Logger[F],
itemId: Ident,
collective: Ident,
collective: CollectiveId,
folder: Option[Ident]
): F[Unit] =
logger.warn("Full-text search is disabled!")
@ -166,7 +166,7 @@ object FtsClient {
def clearAll(logger: Logger[F]): F[Unit] =
logger.warn("Full-text search is disabled!")
def clear(logger: Logger[F], collective: Ident): F[Unit] =
def clear(logger: Logger[F], collective: CollectiveId): F[Unit] =
logger.warn("Full-text search is disabled!")
}
}

View File

@ -21,7 +21,7 @@ import docspell.common._
*/
final case class FtsQuery(
q: String,
collective: Ident,
collective: CollectiveId,
items: Set[Ident],
folders: Set[Ident],
limit: Int,
@ -37,7 +37,7 @@ final case class FtsQuery(
}
object FtsQuery {
def apply(q: String, collective: Ident, limit: Int, offset: Int): FtsQuery =
def apply(q: String, collective: CollectiveId, limit: Int, offset: Int): FtsQuery =
FtsQuery(q, collective, Set.empty, Set.empty, limit, offset, HighlightSetting.default)
case class HighlightSetting(pre: String, post: String)

View File

@ -14,7 +14,7 @@ sealed trait TextData {
def item: Ident
def collective: Ident
def collective: CollectiveId
def folder: Option[Ident]
@ -32,7 +32,7 @@ object TextData {
final case class Attachment(
item: Ident,
attachId: Ident,
collective: Ident,
collective: CollectiveId,
folder: Option[Ident],
language: Language,
name: Option[String],
@ -46,7 +46,7 @@ object TextData {
def attachment(
item: Ident,
attachId: Ident,
collective: Ident,
collective: CollectiveId,
folder: Option[Ident],
lang: Language,
name: Option[String],
@ -56,7 +56,7 @@ object TextData {
final case class Item(
item: Ident,
collective: Ident,
collective: CollectiveId,
folder: Option[Ident],
name: Option[String],
notes: Option[String],
@ -69,7 +69,7 @@ object TextData {
def item(
item: Ident,
collective: Ident,
collective: CollectiveId,
folder: Option[Ident],
name: Option[String],
notes: Option[String],