mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 改进索引订正,考虑大小写库
This commit is contained in:
parent
772984fe1b
commit
f84efb9efa
2 changed files with 51 additions and 31 deletions
|
|
@ -597,8 +597,8 @@ func GetBlock(id string) (ret *Block) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetRootUpdated() (ret map[string]string, err error) {
|
||||
rows, err := query("SELECT root_id, updated FROM blocks WHERE type = 'd'")
|
||||
func GetRootUpdated(blocksTable string) (ret map[string]string, err error) {
|
||||
rows, err := query("SELECT root_id, updated FROM `" + blocksTable + "` WHERE type = 'd'")
|
||||
if nil != err {
|
||||
logging.LogErrorf("sql query failed: %s", err)
|
||||
return
|
||||
|
|
@ -614,8 +614,8 @@ func GetRootUpdated() (ret map[string]string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetDuplicatedRootIDs() (ret []string) {
|
||||
rows, err := query("SELECT DISTINCT root_id FROM blocks GROUP BY id HAVING COUNT(*) > 1")
|
||||
func GetDuplicatedRootIDs(blocksTable string) (ret []string) {
|
||||
rows, err := query("SELECT DISTINCT root_id FROM `" + blocksTable + "` GROUP BY id HAVING COUNT(*) > 1")
|
||||
if nil != err {
|
||||
logging.LogErrorf("sql query failed: %s", err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue