Documentation ¶
Index ¶
- type DB
- func (db *DB) AddPatchSetTitle(id, patch, title string) (count int, err error)
- func (db *DB) AddTagGroup(group *TagGroup) error
- func (db *DB) AllDeletedNotes() (notes []*Note, err error)
- func (db *DB) AllNotes() (notes []*Note, err error)
- func (db *DB) AllReminders() (notes []*Note, err error)
- func (db *DB) AllTagGroups() (groups []TagGroup, err error)
- func (db *DB) AllTagsByDate() (tags []Tag, err error)
- func (db *DB) AllTagsByName() (tags []Tag, err error)
- func (db *DB) ChangeReminder(id, remindAt string) error
- func (db *DB) ChangeType(id string, noteType NoteType) error
- func (db *DB) Close() error
- func (db *DB) DeleteNoteForever(id string) error
- func (db *DB) DeleteTag(id string) error
- func (db *DB) Exec(query string, args ...interface{}) (err error)
- func (db *DB) ExportAllNotes() (notes []Note, err error)
- func (db *DB) GetByID(id string) (note Note, err error)
- func (db *DB) GetGroupsByTagID(tagID string) (groups [][]SimpleTag, err error)
- func (db *DB) GetNotesByTagID(tagID string) ([]*Note, error)
- func (db *DB) GetTagByID(id string) (tag Tag, err error)
- func (db *DB) GetTagByName(name string) (tag Tag, err error)
- func (db *DB) GetTotalSize() (size int, err error)
- func (db *DB) ImportNotes(notes []Note) (err error)
- func (db *DB) Insert(note *Note) error
- func (db *DB) NewNote(title, patch, remindAt string, noteType NoteType, tagNames []string) (*Note, error)
- func (db *DB) Open(dbPath string) (err error)
- func (db *DB) RenameTag(id, newName string) (tagID string, err error)
- func (db *DB) ResetCurrentID() (newid string, err error)
- func (db *DB) SearchTagGroup(tagNames []string) ([]*Note, error)
- func (db *DB) SearchTitle(pattern string) (notes []*Note, err error)
- func (db *DB) SetNoteDeleted(id string, deleted bool) error
- func (db *DB) SetTagGroupProtected(groupID string, protected bool) error
- func (db *DB) UpdateTags(id string, tagNames []string) error
- type IncreaseID
- type Note
- type NoteType
- type Row
- type Set
- type SimpleTag
- type Stmt
- type TX
- type Tag
- type TagGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct { DB *sql.DB Sess *session.Manager sync.Mutex // contains filtered or unexported fields }
func (*DB) AddPatchSetTitle ¶
func (*DB) AddTagGroup ¶
func (*DB) AllDeletedNotes ¶
func (*DB) AllReminders ¶
func (*DB) AllTagGroups ¶
func (*DB) AllTagsByDate ¶
AllTagsByDate fetches all tags, sorted by "CreatedAt".
func (*DB) AllTagsByName ¶
AllTags fetches all tags, sorted by "Name".
func (*DB) ChangeReminder ¶
func (*DB) ChangeType ¶
ChangeType 同时也可能需要修改标题。
func (*DB) DeleteNoteForever ¶
func (*DB) ExportAllNotes ¶
func (*DB) GetGroupsByTagID ¶
func (*DB) GetTotalSize ¶
func (*DB) ImportNotes ¶
func (*DB) NewNote ¶
func (db *DB) NewNote( title, patch, remindAt string, noteType NoteType, tagNames []string) (*Note, error)
NewNote .
func (*DB) ResetCurrentID ¶
func (*DB) SearchTagGroup ¶
SearchTagGroup 通过标签组搜索笔记。
func (*DB) SetTagGroupProtected ¶
SetTagGroupProtected .
type IncreaseID ¶
type IncreaseID = model.IncreaseID
Click to show internal directories.
Click to hide internal directories.