mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 List file/asset history following the limit of editor history retention days https://github.com/siyuan-note/siyuan/issues/9723
This commit is contained in:
parent
e0d0c5c4d5
commit
f5205d846c
3 changed files with 15 additions and 14 deletions
|
|
@ -104,9 +104,9 @@ func queryHistory(query string, args ...interface{}) (*sql.Rows, error) {
|
|||
return historyDB.Query(query, args...)
|
||||
}
|
||||
|
||||
func deleteHistoriesByPathPrefix(tx *sql.Tx, pathPrefix string, context map[string]interface{}) (err error) {
|
||||
stmt := "DELETE FROM histories_fts_case_insensitive WHERE path LIKE ?"
|
||||
if err = execStmtTx(tx, stmt, pathPrefix+"%"); nil != err {
|
||||
func deleteOutdatedHistories(tx *sql.Tx, before string, context map[string]interface{}) (err error) {
|
||||
stmt := "DELETE FROM histories_fts_case_insensitive WHERE created < ?"
|
||||
if err = execStmtTx(tx, stmt, before); nil != err {
|
||||
return
|
||||
}
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue