Skip to content

Commit

Permalink
Merge pull request #1293 from Tolriq/search_description
Browse files Browse the repository at this point in the history
Search in shares now also search in the description column.
  • Loading branch information
eikek authored Jan 6, 2024
2 parents a4cbb79 + a42bdc2 commit 57598fb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ object Queries {
val aliasId = "a" :: RAlias.Columns.id
val shareAlias = "s" :: RShare.Columns.aliasId
val created = "s" :: RShare.Columns.created
val description = "s" :: RShare.Columns.description
val cols = RShare.Columns.all.map("s" :: _).map(_.f) ++ Seq(
("p" :: RPublishShare.Columns.enabled).f,
("p" :: RPublishShare.Columns.publishUntil).f,
Expand All @@ -222,7 +223,7 @@ object Queries {
from,
Sql.and(
Sql.or(account.is(accId.id), shareAlias.in(aliasMemberOf(accId.id))),
Sql.or(name.like(qs), sid.like(qs), aliasName.like(qs))
Sql.or(name.like(qs), sid.like(qs), aliasName.like(qs), description.like(qs))
)
) ++ fr"ORDER BY" ++ created.f ++ fr"DESC"
logger.stream.trace(s"$frag").drain ++
Expand Down

0 comments on commit 57598fb

Please sign in to comment.