MCPcopy Index your code
hub / github.com/TruthHun/BookStack / GetFiledById

Method GetFiledById

models/document_store.go:68–78  ·  view source on GitHub ↗

查询markdown内容或者content内容

(docId interface{}, field string)

Source from the content-addressed store, hash-verified

66
67//查询markdown内容或者content内容
68func (this *DocumentStore) GetFiledById(docId interface{}, field string) string {
69 var ds = DocumentStore{}
70 if field != "markdown" {
71 field = "content"
72 }
73 orm.NewOrm().QueryTable(TableDocumentStore).Filter("document_id", docId).One(&ds, field)
74 if field == "content" {
75 return ds.Content
76 }
77 return ds.Markdown
78}
79
80//查询markdown内容或者content内容
81func (this *DocumentStore) DeleteById(docId ...interface{}) {

Callers 7

generateMethod · 0.95
CreateMethod · 0.80
ContentMethod · 0.80
CompareMethod · 0.80
RenderMarkdownMethod · 0.80
GenerateBookMethod · 0.80
AutoTitleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected