mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🔥 表 blocks 新增 fmarkdown 字段 https://github.com/siyuan-note/siyuan/issues/5720
This commit is contained in:
parent
51eedd11eb
commit
f9befd8d13
8 changed files with 97 additions and 101 deletions
|
|
@ -25,32 +25,31 @@ import (
|
||||||
|
|
||||||
// Block 描述了内容块。
|
// Block 描述了内容块。
|
||||||
type Block struct {
|
type Block struct {
|
||||||
Box string `json:"box"`
|
Box string `json:"box"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
HPath string `json:"hPath"`
|
HPath string `json:"hPath"`
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
RootID string `json:"rootID"`
|
RootID string `json:"rootID"`
|
||||||
ParentID string `json:"parentID"`
|
ParentID string `json:"parentID"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Alias string `json:"alias"`
|
Alias string `json:"alias"`
|
||||||
Memo string `json:"memo"`
|
Memo string `json:"memo"`
|
||||||
Tag string `json:"tag"`
|
Tag string `json:"tag"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
FContent string `json:"fcontent"`
|
FContent string `json:"fcontent"`
|
||||||
Markdown string `json:"markdown"`
|
Markdown string `json:"markdown"`
|
||||||
FMarkdown string `json:"fmarkdown"`
|
Folded bool `json:"folded"`
|
||||||
Folded bool `json:"folded"`
|
Type string `json:"type"`
|
||||||
Type string `json:"type"`
|
SubType string `json:"subType"`
|
||||||
SubType string `json:"subType"`
|
RefText string `json:"refText"`
|
||||||
RefText string `json:"refText"`
|
Defs []*Block `json:"-"` // 当前块引用了这些块,避免序列化 JSON 时产生循环引用
|
||||||
Defs []*Block `json:"-"` // 当前块引用了这些块,避免序列化 JSON 时产生循环引用
|
Refs []*Block `json:"refs"` // 当前块被这些块引用
|
||||||
Refs []*Block `json:"refs"` // 当前块被这些块引用
|
DefID string `json:"defID"`
|
||||||
DefID string `json:"defID"`
|
DefPath string `json:"defPath"`
|
||||||
DefPath string `json:"defPath"`
|
IAL map[string]string `json:"ial"`
|
||||||
IAL map[string]string `json:"ial"`
|
Children []*Block `json:"children"`
|
||||||
Children []*Block `json:"children"`
|
Depth int `json:"depth"`
|
||||||
Depth int `json:"depth"`
|
Count int `json:"count"`
|
||||||
Count int `json:"count"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (block *Block) IsContainerBlock() bool {
|
func (block *Block) IsContainerBlock() bool {
|
||||||
|
|
|
||||||
|
|
@ -718,7 +718,7 @@ func fullTextSearchHistory(query string, page int) (ret []*History, matchedBlock
|
||||||
query = stringQuery(query)
|
query = stringQuery(query)
|
||||||
|
|
||||||
table := "histories_fts_case_insensitive"
|
table := "histories_fts_case_insensitive"
|
||||||
projections := "type, op, title, content, path"
|
projections := "type, op, title, content, path, created"
|
||||||
stmt := "SELECT " + projections + " FROM " + table + " WHERE " + table + " MATCH '{title content}:(" + query + ")'"
|
stmt := "SELECT " + projections + " FROM " + table + " WHERE " + table + " MATCH '{title content}:(" + query + ")'"
|
||||||
stmt += " ORDER BY created DESC LIMIT " + strconv.Itoa(page)
|
stmt += " ORDER BY created DESC LIMIT " + strconv.Itoa(page)
|
||||||
sqlHistories := sql.SelectHistoriesRawStmt(stmt)
|
sqlHistories := sql.SelectHistoriesRawStmt(stmt)
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,8 @@ func fullTextSearchCount(query, box, path, filter string) (matchedBlockCount, ma
|
||||||
}
|
}
|
||||||
|
|
||||||
func fullTextSearch(query, box, path, filter string, beforeLen int, querySyntax bool) (ret []*Block, matchedBlockCount, matchedRootCount int) {
|
func fullTextSearch(query, box, path, filter string, beforeLen int, querySyntax bool) (ret []*Block, matchedBlockCount, matchedRootCount int) {
|
||||||
|
fullTextSearchHistory(query, 1)
|
||||||
|
|
||||||
query = gulu.Str.RemoveInvisible(query)
|
query = gulu.Str.RemoveInvisible(query)
|
||||||
if util.IsIDPattern(query) {
|
if util.IsIDPattern(query) {
|
||||||
ret, matchedBlockCount, matchedRootCount = searchBySQL("SELECT * FROM `blocks` WHERE `id` = '"+query+"'", beforeLen)
|
ret, matchedBlockCount, matchedRootCount = searchBySQL("SELECT * FROM `blocks` WHERE `id` = '"+query+"'", beforeLen)
|
||||||
|
|
@ -490,21 +492,20 @@ func fromSQLBlock(sqlBlock *sql.Block, terms string, beforeLen int) (block *Bloc
|
||||||
markdown := maxContent(sqlBlock.Markdown, 5120)
|
markdown := maxContent(sqlBlock.Markdown, 5120)
|
||||||
|
|
||||||
block = &Block{
|
block = &Block{
|
||||||
Box: sqlBlock.Box,
|
Box: sqlBlock.Box,
|
||||||
Path: p,
|
Path: p,
|
||||||
ID: id,
|
ID: id,
|
||||||
RootID: sqlBlock.RootID,
|
RootID: sqlBlock.RootID,
|
||||||
ParentID: sqlBlock.ParentID,
|
ParentID: sqlBlock.ParentID,
|
||||||
Alias: sqlBlock.Alias,
|
Alias: sqlBlock.Alias,
|
||||||
Name: sqlBlock.Name,
|
Name: sqlBlock.Name,
|
||||||
Memo: sqlBlock.Memo,
|
Memo: sqlBlock.Memo,
|
||||||
Tag: sqlBlock.Tag,
|
Tag: sqlBlock.Tag,
|
||||||
Content: content,
|
Content: content,
|
||||||
FContent: sqlBlock.FContent,
|
FContent: sqlBlock.FContent,
|
||||||
Markdown: markdown,
|
Markdown: markdown,
|
||||||
FMarkdown: sqlBlock.FMarkdown,
|
Type: treenode.FromAbbrType(sqlBlock.Type),
|
||||||
Type: treenode.FromAbbrType(sqlBlock.Type),
|
SubType: sqlBlock.SubType,
|
||||||
SubType: sqlBlock.SubType,
|
|
||||||
}
|
}
|
||||||
if "" != sqlBlock.IAL {
|
if "" != sqlBlock.IAL {
|
||||||
block.IAL = map[string]string{}
|
block.IAL = map[string]string{}
|
||||||
|
|
|
||||||
|
|
@ -21,28 +21,27 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type Block struct {
|
type Block struct {
|
||||||
ID string
|
ID string
|
||||||
ParentID string
|
ParentID string
|
||||||
RootID string
|
RootID string
|
||||||
Hash string
|
Hash string
|
||||||
Box string
|
Box string
|
||||||
Path string
|
Path string
|
||||||
HPath string
|
HPath string
|
||||||
Name string
|
Name string
|
||||||
Alias string
|
Alias string
|
||||||
Memo string
|
Memo string
|
||||||
Tag string
|
Tag string
|
||||||
Content string
|
Content string
|
||||||
FContent string
|
FContent string
|
||||||
Markdown string
|
Markdown string
|
||||||
FMarkdown string
|
Length int
|
||||||
Length int
|
Type string
|
||||||
Type string
|
SubType string
|
||||||
SubType string
|
IAL string
|
||||||
IAL string
|
Sort int
|
||||||
Sort int
|
Created string
|
||||||
Created string
|
Updated string
|
||||||
Updated string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateRootContent(tx *sql.Tx, content, id string) {
|
func updateRootContent(tx *sql.Tx, content, id string) {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ func QueryRootBlockByCondition(condition string) (ret []*Block) {
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var block Block
|
var block Block
|
||||||
var sepCount int
|
var sepCount int
|
||||||
if err = rows.Scan(&block.ID, &block.ParentID, &block.RootID, &block.Hash, &block.Box, &block.Path, &block.HPath, &block.Name, &block.Alias, &block.Memo, &block.Tag, &block.Content, &block.FContent, &block.Markdown, &block.FMarkdown, &block.Length, &block.Type, &block.SubType, &block.IAL, &block.Sort, &block.Created, &block.Updated, &sepCount); nil != err {
|
if err = rows.Scan(&block.ID, &block.ParentID, &block.RootID, &block.Hash, &block.Box, &block.Path, &block.HPath, &block.Name, &block.Alias, &block.Memo, &block.Tag, &block.Content, &block.FContent, &block.Markdown, &block.Length, &block.Type, &block.SubType, &block.IAL, &block.Sort, &block.Created, &block.Updated, &sepCount); nil != err {
|
||||||
logging.LogErrorf("query scan field failed: %s", err)
|
logging.LogErrorf("query scan field failed: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -484,7 +484,7 @@ func selectBlocksRawStmt(stmt string, limit int) (ret []*Block) {
|
||||||
|
|
||||||
func scanBlockRows(rows *sql.Rows) (ret *Block) {
|
func scanBlockRows(rows *sql.Rows) (ret *Block) {
|
||||||
var block Block
|
var block Block
|
||||||
if err := rows.Scan(&block.ID, &block.ParentID, &block.RootID, &block.Hash, &block.Box, &block.Path, &block.HPath, &block.Name, &block.Alias, &block.Memo, &block.Tag, &block.Content, &block.FContent, &block.Markdown, &block.FMarkdown, &block.Length, &block.Type, &block.SubType, &block.IAL, &block.Sort, &block.Created, &block.Updated); nil != err {
|
if err := rows.Scan(&block.ID, &block.ParentID, &block.RootID, &block.Hash, &block.Box, &block.Path, &block.HPath, &block.Name, &block.Alias, &block.Memo, &block.Tag, &block.Content, &block.FContent, &block.Markdown, &block.Length, &block.Type, &block.SubType, &block.IAL, &block.Sort, &block.Created, &block.Updated); nil != err {
|
||||||
logging.LogErrorf("query scan field failed: %s\n%s", err, logging.ShortStack())
|
logging.LogErrorf("query scan field failed: %s\n%s", err, logging.ShortStack())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -494,7 +494,7 @@ func scanBlockRows(rows *sql.Rows) (ret *Block) {
|
||||||
|
|
||||||
func scanBlockRow(row *sql.Row) (ret *Block) {
|
func scanBlockRow(row *sql.Row) (ret *Block) {
|
||||||
var block Block
|
var block Block
|
||||||
if err := row.Scan(&block.ID, &block.ParentID, &block.RootID, &block.Hash, &block.Box, &block.Path, &block.HPath, &block.Name, &block.Alias, &block.Memo, &block.Tag, &block.Content, &block.FContent, &block.Markdown, &block.FMarkdown, &block.Length, &block.Type, &block.SubType, &block.IAL, &block.Sort, &block.Created, &block.Updated); nil != err {
|
if err := row.Scan(&block.ID, &block.ParentID, &block.RootID, &block.Hash, &block.Box, &block.Path, &block.HPath, &block.Name, &block.Alias, &block.Memo, &block.Tag, &block.Content, &block.FContent, &block.Markdown, &block.Length, &block.Type, &block.SubType, &block.IAL, &block.Sort, &block.Created, &block.Updated); nil != err {
|
||||||
if sql.ErrNoRows != err {
|
if sql.ErrNoRows != err {
|
||||||
logging.LogErrorf("query scan field failed: %s\n%s", err, logging.ShortStack())
|
logging.LogErrorf("query scan field failed: %s\n%s", err, logging.ShortStack())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ func DefRefs(condition string) (ret []map[*Block]*Block) {
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var ref Block
|
var ref Block
|
||||||
var rel string
|
var rel string
|
||||||
if err = rows.Scan(&ref.ID, &ref.ParentID, &ref.RootID, &ref.Hash, &ref.Box, &ref.Path, &ref.HPath, &ref.Name, &ref.Alias, &ref.Memo, &ref.Tag, &ref.Content, &ref.FContent, &ref.Markdown, &ref.FMarkdown, &ref.Length, &ref.Type, &ref.SubType, &ref.IAL, &ref.Sort, &ref.Created, &ref.Updated,
|
if err = rows.Scan(&ref.ID, &ref.ParentID, &ref.RootID, &ref.Hash, &ref.Box, &ref.Path, &ref.HPath, &ref.Name, &ref.Alias, &ref.Memo, &ref.Tag, &ref.Content, &ref.FContent, &ref.Markdown, &ref.Length, &ref.Type, &ref.SubType, &ref.IAL, &ref.Sort, &ref.Created, &ref.Updated,
|
||||||
&rel); nil != err {
|
&rel); nil != err {
|
||||||
logging.LogErrorf("query scan field failed: %s", err)
|
logging.LogErrorf("query scan field failed: %s", err)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -99,19 +99,19 @@ func initDBTables() {
|
||||||
setDatabaseVer()
|
setDatabaseVer()
|
||||||
|
|
||||||
db.Exec("DROP TABLE blocks")
|
db.Exec("DROP TABLE blocks")
|
||||||
_, err = db.Exec("CREATE TABLE blocks (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, fmarkdown, length, type, subtype, ial, sort, created, updated)")
|
_, err = db.Exec("CREATE TABLE blocks (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, length, type, subtype, ial, sort, created, updated)")
|
||||||
if nil != err {
|
if nil != err {
|
||||||
logging.LogFatalf("create table [blocks] failed: %s", err)
|
logging.LogFatalf("create table [blocks] failed: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
db.Exec("DROP TABLE blocks_fts")
|
db.Exec("DROP TABLE blocks_fts")
|
||||||
_, err = db.Exec("CREATE VIRTUAL TABLE blocks_fts USING fts5(id UNINDEXED, parent_id UNINDEXED, root_id UNINDEXED, hash UNINDEXED, box UNINDEXED, path UNINDEXED, hpath, name, alias, memo, tag, content, fcontent, markdown UNINDEXED, fmarkdown UNINDEXED, length UNINDEXED, type UNINDEXED, subtype UNINDEXED, ial, sort UNINDEXED, created UNINDEXED, updated UNINDEXED, tokenize=\"siyuan\")")
|
_, err = db.Exec("CREATE VIRTUAL TABLE blocks_fts USING fts5(id UNINDEXED, parent_id UNINDEXED, root_id UNINDEXED, hash UNINDEXED, box UNINDEXED, path UNINDEXED, hpath, name, alias, memo, tag, content, fcontent, markdown UNINDEXED, length UNINDEXED, type UNINDEXED, subtype UNINDEXED, ial, sort UNINDEXED, created UNINDEXED, updated UNINDEXED, tokenize=\"siyuan\")")
|
||||||
if nil != err {
|
if nil != err {
|
||||||
logging.LogFatalf("create table [blocks_fts] failed: %s", err)
|
logging.LogFatalf("create table [blocks_fts] failed: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
db.Exec("DROP TABLE blocks_fts_case_insensitive")
|
db.Exec("DROP TABLE blocks_fts_case_insensitive")
|
||||||
_, err = db.Exec("CREATE VIRTUAL TABLE blocks_fts_case_insensitive USING fts5(id UNINDEXED, parent_id UNINDEXED, root_id UNINDEXED, hash UNINDEXED, box UNINDEXED, path UNINDEXED, hpath, name, alias, memo, tag, content, fcontent, markdown UNINDEXED, fmarkdown UNINDEXED, length UNINDEXED, type UNINDEXED, subtype UNINDEXED, ial, sort UNINDEXED, created UNINDEXED, updated UNINDEXED, tokenize=\"siyuan case_insensitive\")")
|
_, err = db.Exec("CREATE VIRTUAL TABLE blocks_fts_case_insensitive USING fts5(id UNINDEXED, parent_id UNINDEXED, root_id UNINDEXED, hash UNINDEXED, box UNINDEXED, path UNINDEXED, hpath, name, alias, memo, tag, content, fcontent, markdown UNINDEXED, length UNINDEXED, type UNINDEXED, subtype UNINDEXED, ial, sort UNINDEXED, created UNINDEXED, updated UNINDEXED, tokenize=\"siyuan case_insensitive\")")
|
||||||
if nil != err {
|
if nil != err {
|
||||||
logging.LogFatalf("create table [blocks_fts_case_insensitive] failed: %s", err)
|
logging.LogFatalf("create table [blocks_fts_case_insensitive] failed: %s", err)
|
||||||
}
|
}
|
||||||
|
|
@ -712,19 +712,18 @@ func buildBlockFromNode(n *ast.Node, tree *parse.Tree) (block *Block, attributes
|
||||||
memo := html.UnescapeString(n.IALAttr("memo"))
|
memo := html.UnescapeString(n.IALAttr("memo"))
|
||||||
tag := tagFromNode(n)
|
tag := tagFromNode(n)
|
||||||
|
|
||||||
var content, fcontent, markdown, fmarkdown, parentID string
|
var content, fcontent, markdown, parentID string
|
||||||
ialContent := treenode.IALStr(n)
|
ialContent := treenode.IALStr(n)
|
||||||
hash := treenode.NodeHash(n, tree, luteEngine)
|
hash := treenode.NodeHash(n, tree, luteEngine)
|
||||||
var length int
|
var length int
|
||||||
if ast.NodeDocument == n.Type {
|
if ast.NodeDocument == n.Type {
|
||||||
content = n.IALAttr("title")
|
content = n.IALAttr("title")
|
||||||
fcontent = content
|
fcontent = content
|
||||||
fmarkdown = content
|
|
||||||
length = utf8.RuneCountInString(fcontent)
|
length = utf8.RuneCountInString(fcontent)
|
||||||
} else if n.IsContainerBlock() {
|
} else if n.IsContainerBlock() {
|
||||||
markdown, content = treenode.NodeStaticMdContent(n, luteEngine)
|
markdown, content = treenode.NodeStaticMdContent(n, luteEngine)
|
||||||
fc := treenode.FirstLeafBlock(n)
|
fc := treenode.FirstLeafBlock(n)
|
||||||
fmarkdown, fcontent = treenode.NodeStaticMdContent(fc, luteEngine)
|
fcontent = treenode.NodeStaticContent(fc)
|
||||||
parentID = n.Parent.ID
|
parentID = n.Parent.ID
|
||||||
// 将标题块作为父节点
|
// 将标题块作为父节点
|
||||||
if h := heading(n); nil != h {
|
if h := heading(n); nil != h {
|
||||||
|
|
@ -742,28 +741,27 @@ func buildBlockFromNode(n *ast.Node, tree *parse.Tree) (block *Block, attributes
|
||||||
}
|
}
|
||||||
|
|
||||||
block = &Block{
|
block = &Block{
|
||||||
ID: n.ID,
|
ID: n.ID,
|
||||||
ParentID: parentID,
|
ParentID: parentID,
|
||||||
RootID: rootID,
|
RootID: rootID,
|
||||||
Hash: hash,
|
Hash: hash,
|
||||||
Box: boxID,
|
Box: boxID,
|
||||||
Path: p,
|
Path: p,
|
||||||
HPath: tree.HPath,
|
HPath: tree.HPath,
|
||||||
Name: name,
|
Name: name,
|
||||||
Alias: alias,
|
Alias: alias,
|
||||||
Memo: memo,
|
Memo: memo,
|
||||||
Tag: tag,
|
Tag: tag,
|
||||||
Content: content,
|
Content: content,
|
||||||
FContent: fcontent,
|
FContent: fcontent,
|
||||||
Markdown: markdown,
|
Markdown: markdown,
|
||||||
FMarkdown: fmarkdown,
|
Length: length,
|
||||||
Length: length,
|
Type: treenode.TypeAbbr(n.Type.String()),
|
||||||
Type: treenode.TypeAbbr(n.Type.String()),
|
SubType: treenode.SubTypeAbbr(n),
|
||||||
SubType: treenode.SubTypeAbbr(n),
|
IAL: ialContent,
|
||||||
IAL: ialContent,
|
Sort: nSort(n),
|
||||||
Sort: nSort(n),
|
Created: util.TimeFromID(n.ID),
|
||||||
Created: util.TimeFromID(n.ID),
|
Updated: n.IALAttr("updated"),
|
||||||
Updated: n.IALAttr("updated"),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
attrs := parse.IAL2Map(n.KramdownIAL)
|
attrs := parse.IAL2Map(n.KramdownIAL)
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,10 @@ func InsertRefs(tx *sql.Tx, tree *parse.Tree) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BlocksInsert = "INSERT INTO blocks (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, fmarkdown, length, type, subtype, ial, sort, created, updated) VALUES %s"
|
BlocksInsert = "INSERT INTO blocks (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, length, type, subtype, ial, sort, created, updated) VALUES %s"
|
||||||
BlocksFTSInsert = "INSERT INTO blocks_fts (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, fmarkdown, length, type, subtype, ial, sort, created, updated) VALUES %s"
|
BlocksFTSInsert = "INSERT INTO blocks_fts (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, length, type, subtype, ial, sort, created, updated) VALUES %s"
|
||||||
BlocksFTSCaseInsensitiveInsert = "INSERT INTO blocks_fts_case_insensitive (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, fmarkdown, length, type, subtype, ial, sort, created, updated) VALUES %s"
|
BlocksFTSCaseInsensitiveInsert = "INSERT INTO blocks_fts_case_insensitive (id, parent_id, root_id, hash, box, path, hpath, name, alias, memo, tag, content, fcontent, markdown, length, type, subtype, ial, sort, created, updated) VALUES %s"
|
||||||
BlocksPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
BlocksPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
||||||
|
|
||||||
SpansInsert = "INSERT INTO spans (id, block_id, root_id, box, path, content, markdown, type, ial) VALUES %s"
|
SpansInsert = "INSERT INTO spans (id, block_id, root_id, box, path, content, markdown, type, ial) VALUES %s"
|
||||||
SpansPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
SpansPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?)"
|
||||||
|
|
@ -106,7 +106,6 @@ func insertBlocks0(tx *sql.Tx, bulk []*Block) (err error) {
|
||||||
valueArgs = append(valueArgs, b.Content)
|
valueArgs = append(valueArgs, b.Content)
|
||||||
valueArgs = append(valueArgs, b.FContent)
|
valueArgs = append(valueArgs, b.FContent)
|
||||||
valueArgs = append(valueArgs, b.Markdown)
|
valueArgs = append(valueArgs, b.Markdown)
|
||||||
valueArgs = append(valueArgs, b.FMarkdown)
|
|
||||||
valueArgs = append(valueArgs, b.Length)
|
valueArgs = append(valueArgs, b.Length)
|
||||||
valueArgs = append(valueArgs, b.Type)
|
valueArgs = append(valueArgs, b.Type)
|
||||||
valueArgs = append(valueArgs, b.SubType)
|
valueArgs = append(valueArgs, b.SubType)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue