mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Add search form
This commit is contained in:
parent
af15412954
commit
6d0dc451e4
20 changed files with 383 additions and 49 deletions
|
@ -23,6 +23,14 @@ type EntryPaginationBuilder struct {
|
|||
direction string
|
||||
}
|
||||
|
||||
// WithSearchQuery adds full-text search query to the condition.
|
||||
func (e *EntryPaginationBuilder) WithSearchQuery(query string) {
|
||||
if query != "" {
|
||||
e.conditions = append(e.conditions, fmt.Sprintf("e.document_vectors @@ plainto_tsquery($%d)", len(e.args)+1))
|
||||
e.args = append(e.args, query)
|
||||
}
|
||||
}
|
||||
|
||||
// WithStarred adds starred to the condition.
|
||||
func (e *EntryPaginationBuilder) WithStarred() {
|
||||
e.conditions = append(e.conditions, "e.starred is true")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue