Documentation ¶
Index ¶
- Constants
- func AutoFlushTreeQueue()
- func BeginHistoryTx() (tx *sql.Tx, err error)
- func BeginTx() (tx *sql.Tx, err error)
- func CacheRef(tree *parse.Tree, refNode *ast.Node)
- func ClearBlockCache()
- func ClearBoxHash(tx *sql.Tx)
- func ClearQueue()
- func ClearVirtualRefKeywords()
- func CloseDatabase()
- func CommitTx(tx *sql.Tx) (err error)
- func DefRefs(condition string) (ret []map[*Block]*Block)
- func DeleteAssetsByHashes(hashes []string)
- func DeleteBlockByIDs(tx *sql.Tx, ids []string) (err error)
- func DeleteByBoxTx(tx *sql.Tx, box string) (err error)
- func DeleteByRootID(tx *sql.Tx, rootID string) (err error)
- func DeleteHistoriesByPathPrefix(tx *sql.Tx, pathPrefix string) (err error)
- func DeleteRefsByBoxTx(tx *sql.Tx, box string) (err error)
- func DisableCache()
- func EnableCache()
- func GetBoxHash(box string) string
- func GetContainerText(container *ast.Node) string
- func GetDuplicatedRootIDs() (ret []string)
- func GetRefText(defBlockID string) (ret string)
- func GetRootUpdated() (ret map[string]string, err error)
- func IndexMode()
- func InitDatabase(forceRebuild bool) (err error)
- func InitHistoryDatabase(forceRebuild bool)
- func InsertBlock(tx *sql.Tx, block *Block, context map[string]interface{}) (err error)
- func InsertBlocksSpans(tx *sql.Tx, tree *parse.Tree, context map[string]interface{}) (err error)
- func InsertHistories(tx *sql.Tx, histories []*History) (err error)
- func InsertRefs(tx *sql.Tx, tree *parse.Tree)
- func IsBlockFolded(id string) (ret bool)
- func IsEmptyQueue() bool
- func NormalMode()
- func PutBoxHash(tx *sql.Tx, box, hash string)
- func Query(stmt string) (ret []map[string]interface{}, err error)
- func QueryBlockAliases(rootID string) (ret []string)
- func QueryBlockDefIDsByRefText(refText string, excludeIDs []string) (ret []string)
- func QueryBlockNamesByRootID(rootID string) (ret []string)
- func QueryBookmarkLabels() (ret []string)
- func QueryChildDefIDsByRootDefID(rootDefID string) (ret []string)
- func QueryHistory(stmt string) (ret []map[string]interface{}, err error)
- func QueryRefIDsByAnnotationID(annotationID string) (refIDs, refTexts []string)
- func QueryRefIDsByDefID(defID string, containChildren bool) (refIDs, refTexts []string)
- func QueryRootBlockRefCount() (ret map[string]int)
- func QueryRootChildrenRefCount(defRootID string) (ret map[string]int)
- func QueryVirtualRefKeywords(name, alias, anchor, doc bool) (ret []string)
- func RemoveBoxHash(tx *sql.Tx, box string)
- func RemoveTreePathQueue(treeBox, treePathPrefix string)
- func RemoveTreeQueue(box, rootID string)
- func RenameTreeQueue(tree *parse.Tree, oldHPath string)
- func RollbackTx(tx *sql.Tx)
- func SetCaseSensitive(b bool)
- func UpsertRefs(tx *sql.Tx, tree *parse.Tree)
- func UpsertTreeQueue(tree *parse.Tree)
- func WaitForWritingDatabase()
- type Asset
- type Attribute
- type Block
- func BuildBlockFromNode(n *ast.Node, tree *parse.Tree) (block *Block)
- func GetAllChildBlocks(rootID, condition string) (ret []*Block)
- func GetAllRootBlocks() (ret []*Block)
- func GetBlock(id string) (ret *Block)
- func GetBlocks(ids []string) (ret []*Block)
- func GetChildBlocks(parentID, condition string) (ret []*Block)
- func GetRefExistedBlocks() (ret []*Block)
- func QueryBlockByNameOrAlias(rootID, text string) (ret *Block)
- func QueryBookmarkBlocks() (ret []*Block)
- func QueryBookmarkBlocksByKeyword(bookmark string) (ret []*Block)
- func QueryDefRootBlocksByRefRootID(refRootID string) (ret []*Block)
- func QueryRecentUpdatedBlocks() (ret []*Block)
- func QueryRefRootBlocksByDefRootID(defRootID string) (ret []*Block)
- func QueryRootBlockByCondition(condition string) (ret []*Block)
- func SelectBlocksRawStmt(stmt string, limit int) (ret []*Block)
- func SelectBlocksRawStmtNoParse(stmt string, limit int) (ret []*Block)
- type FileAnnotationRef
- type History
- type Ref
- type Span
- type Stat
Constants ¶
View Source
const ( HistoriesFTSCaseInsensitiveInsert = "INSERT INTO histories_fts_case_insensitive (type, op, title, content, path, created) VALUES %s" HistoriesPlaceholder = "(?, ?, ?, ?, ?, ?)" )
View Source
const ( BlocksInsert = "" /* 182-byte string literal not displayed */ BlocksFTSInsert = "" /* 186-byte string literal not displayed */ BlocksFTSCaseInsensitiveInsert = "" /* 203-byte string literal not displayed */ BlocksPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" SpansInsert = "INSERT INTO spans (id, block_id, root_id, box, path, content, markdown, type, ial) VALUES %s" SpansPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?)" AssetsPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?)" AttributesPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?)" RefsPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" FileAnnotationRefsPlaceholder = "(?, ?, ?, ?, ?, ?, ?, ?, ?)" )
Variables ¶
This section is empty.
Functions ¶
func AutoFlushTreeQueue ¶
func AutoFlushTreeQueue()
func BeginHistoryTx ¶
func ClearBlockCache ¶
func ClearBlockCache()
func ClearBoxHash ¶
func ClearQueue ¶
func ClearQueue()
func ClearVirtualRefKeywords ¶
func ClearVirtualRefKeywords()
func CloseDatabase ¶
func CloseDatabase()
func DeleteAssetsByHashes ¶
func DeleteAssetsByHashes(hashes []string)
func DisableCache ¶
func DisableCache()
func EnableCache ¶
func EnableCache()
func GetBoxHash ¶
func GetContainerText ¶
func GetDuplicatedRootIDs ¶
func GetDuplicatedRootIDs() (ret []string)
func GetRefText ¶
func GetRootUpdated ¶
func InitDatabase ¶
func InitHistoryDatabase ¶
func InitHistoryDatabase(forceRebuild bool)
func InsertBlock ¶
func InsertBlocksSpans ¶
func IsBlockFolded ¶
func IsEmptyQueue ¶
func IsEmptyQueue() bool
func NormalMode ¶
func NormalMode()
func PutBoxHash ¶
func QueryBlockAliases ¶
func QueryBlockNamesByRootID ¶
func QueryBookmarkLabels ¶
func QueryBookmarkLabels() (ret []string)
func QueryHistory ¶
func QueryRefIDsByDefID ¶
func QueryRootBlockRefCount ¶
func QueryVirtualRefKeywords ¶
func RemoveBoxHash ¶
func RemoveTreePathQueue ¶
func RemoveTreePathQueue(treeBox, treePathPrefix string)
func RemoveTreeQueue ¶
func RemoveTreeQueue(box, rootID string)
func RenameTreeQueue ¶
func RollbackTx ¶
func SetCaseSensitive ¶
func SetCaseSensitive(b bool)
func UpsertTreeQueue ¶
func WaitForWritingDatabase ¶
func WaitForWritingDatabase()
Types ¶
type Asset ¶
type Asset struct { ID string BlockID string RootID string Box string DocPath string Path string Name string Title string Hash string }
func QueryAssetByHash ¶
func QueryRootBlockAssets ¶
type Block ¶
type Block struct { ID string ParentID string RootID string Hash string Box string Path string HPath string Name string Alias string Memo string Tag string Content string FContent string Markdown string Length int Type string SubType string IAL string Sort int Created string Updated string }
func GetAllChildBlocks ¶
func GetAllRootBlocks ¶
func GetAllRootBlocks() (ret []*Block)
func GetChildBlocks ¶
func GetRefExistedBlocks ¶
func GetRefExistedBlocks() (ret []*Block)
func QueryBlockByNameOrAlias ¶
func QueryBookmarkBlocks ¶
func QueryBookmarkBlocks() (ret []*Block)
func QueryRecentUpdatedBlocks ¶
func QueryRecentUpdatedBlocks() (ret []*Block)
func SelectBlocksRawStmt ¶
func (*Block) IsContainerBlock ¶
type FileAnnotationRef ¶
type History ¶
func SelectHistoriesRawStmt ¶
type Ref ¶
type Ref struct { ID string DefBlockID string DefBlockParentID string DefBlockRootID string DefBlockPath string BlockID string RootID string Box string Path string Content string Markdown string Type string }
func GetRefsCacheByDefID ¶
func QueryRefsByDefID ¶
func QueryRefsByDefIDRefID ¶
func QueryRefsRecent ¶
func QueryRefsRecent() (ret []*Ref)
Click to show internal directories.
Click to hide internal directories.