Abschluss einfache Inhaltsuche

This commit is contained in:
Simon Martens
2025-03-01 04:48:47 +01:00
parent 8bc1fdb79c
commit 64c24480ca
8 changed files with 226 additions and 18 deletions

View File

@@ -67,6 +67,39 @@ func (p *BeitraegeFilterParameters) FieldSetBeitraege() []dbmodels.FTS5QueryRequ
return ret
}
func (p BeitraegeFilterParameters) ToQueryParams() string {
r := ""
if p.Agent != "" {
r += "&" + FILTER_PARAM_BEIAEGE_AGENT + "=" + p.Agent
}
if p.Type != "" {
r += "&" + FILTER_PARAM_BEIAEGE_TYPE + "=" + p.Type
}
if p.Year != "" {
r += "&" + FILTER_PARAM_BEIAEGE_YEAR + "=" + p.Year
}
if p.OnlyScans {
r += "&" + FILTER_PARAM_BEIAEGE_ONLYSCANS + "=on"
}
return r
}
func (p BeitraegeFilterParameters) ToQueryParamsWOScans() string {
r := ""
if p.Agent != "" {
r += "&" + FILTER_PARAM_BEIAEGE_AGENT + "=" + p.Agent
}
if p.Type != "" {
r += "&" + FILTER_PARAM_BEIAEGE_TYPE + "=" + p.Type
}
if p.Year != "" {
r += "&" + FILTER_PARAM_BEIAEGE_YEAR + "=" + p.Year
}
return r
}
type SearchResultBeitraege struct {
Queries []dbmodels.FTS5QueryRequest