🎨 数据历史文档和资源文件支持分页和搜索 https://github.com/siyuan-note/siyuan/issues/4901

This commit is contained in:
Liang Ding 2022-08-23 12:15:12 +08:00
parent d31f23e2da
commit f3b495aff5
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 59 additions and 5 deletions

View file

@ -31,6 +31,14 @@ type History struct {
Path string
}
func DeleteHistoriesByPathPrefix(tx *sql.Tx, pathPrefix string) (err error) {
stmt := "DELETE FROM histories_fts_case_insensitive WHERE path LIKE ?"
if err = execStmtTx(tx, stmt, pathPrefix+"%"); nil != err {
return
}
return
}
const (
HistoriesFTSCaseInsensitiveInsert = "INSERT INTO histories_fts_case_insensitive (type, op, title, content, path, created) VALUES %s"
HistoriesPlaceholder = "(?, ?, ?, ?, ?, ?)"