对这个问题的延申
相关帖子
-
JeffreyChen • • 2付费者 支持者 捐赠者
以我对模板函数贫瘠的了解,只能写成这样了:
.action{ if index . "custom-avs" } .action{ $blockId := .id } .action{ $block := toJson (queryBlocks "SELECT * FROM blocks WHERE id = '?' LIMIT 1" $blockId) } .action{ $docId := regexFind "\"RootID\":\"(.*?)\"" $block } .action{ $docId = trimSuffix "\"" (trimPrefix "\"RootID\":\"" $docId) } .action{ $doc := toJson (queryBlocks "SELECT * FROM blocks WHERE id = '?' LIMIT 1" $docId) } .action{ $docName := regexFind "\"Content\":\"(.*?)\"" $doc } .action{ $docName = trimSuffix "\"" (trimPrefix "\"Content\":\"" $docName) } .action{ $docName } .action{ end }
-
JeffreyChen • • 2
以我对模板函数贫瘠的了解,只能写成这样了:
.action{ if index . "custom-avs" } .action{ $blockId := .id } .action{ $block := toJson (queryBlocks "SELECT * FROM blocks WHERE id = '?' LIMIT 1" $blockId) } .action{ $docId := regexFind "\"RootID\":\"(.*?)\"" $block } .action{ $docId = trimSuffix "\"" (trimPrefix "\"RootID\":\"" $docId) } .action{ $doc := toJson (queryBlocks "SELECT * FROM blocks WHERE id = '?' LIMIT 1" $docId) } .action{ $docName := regexFind "\"Content\":\"(.*?)\"" $doc } .action{ $docName = trimSuffix "\"" (trimPrefix "\"Content\":\"" $docName) } .action{ $docName } .action{ end }
1 回复 - 其他回帖
-