mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Column.rank
This commit is contained in:
1 parent
3be2047c9c
commit
cb6d727664
2 files changed
+6
-1
No files matched your search
@@ -310,4 +310,9 @@
|
||||
return self
|
||||
}
|
||||
}
|
||||
|
||||
extension Column {
|
||||
/// The FTS5 rank column
|
||||
public static let rank = Column("rank")
|
||||
}
|
||||
#endif
|
||||
@@ -3725,7 +3725,7 @@ let documents = Document.fetchAll(db,
|
||||
arguments: [pattern])
|
||||
|
||||
// Query Interface
|
||||
let documents = Document.matching(pattern).order(Column("rank")).fetchAll(db)
|
||||
let documents = Document.matching(pattern).order(Column.rank).fetchAll(db)
|
||||
```
|
||||
|
||||
For more information about the ranking algorithm, as well as extra options, read [Sorting by Auxiliary Function Results](https://www.sqlite.org/fts5.html#sorting_by_auxiliary_function_results)
|
||||
|
||||
Reference in new issue
Block a user