mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-09 09:35:00 +09:00
GO-4442 Refactor a bit
This commit is contained in:
parent
bda1dce73a
commit
4b6b06d86a
11 changed files with 71 additions and 79 deletions
|
@ -25,12 +25,12 @@ type Record struct {
|
|||
}
|
||||
|
||||
type Query struct {
|
||||
FullText string
|
||||
SpaceId string
|
||||
Filters []*model.BlockContentDataviewFilter // filters results. apply sequentially
|
||||
Sorts []*model.BlockContentDataviewSort // order results. apply hierarchically
|
||||
Limit int // maximum number of results
|
||||
Offset int // skip given number of results
|
||||
TextQuery string
|
||||
SpaceId string
|
||||
Filters []*model.BlockContentDataviewFilter // filters results. apply sequentially
|
||||
Sorts []*model.BlockContentDataviewSort // order results. apply hierarchically
|
||||
Limit int // maximum number of results
|
||||
Offset int // skip given number of results
|
||||
}
|
||||
|
||||
func injectDefaultFilters(filters []*model.BlockContentDataviewFilter) []*model.BlockContentDataviewFilter {
|
||||
|
@ -105,7 +105,7 @@ func injectDefaultOrder(qry Query, sorts []*model.BlockContentDataviewSort) []*m
|
|||
var (
|
||||
hasScoreSort bool
|
||||
)
|
||||
if qry.FullText == "" {
|
||||
if qry.TextQuery == "" {
|
||||
return sorts
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue