localdb

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBucketNotFound = errors.New("bucket not found")

ErrBucketNotFound is returned when the specified bucket does not exist

Functions

This section is empty.

Types

type LocalDBEngine

type LocalDBEngine struct {
	// contains filtered or unexported fields
}

func NewLocalDBEngine

func NewLocalDBEngine() *LocalDBEngine

NewLocalDBEngine creates a new instance of LocalDBEngine

func (*LocalDBEngine) Close

func (e *LocalDBEngine) Close() error

Close the engine and release resources

func (*LocalDBEngine) CreateNote

func (e *LocalDBEngine) CreateNote(content, headline string, tags []string) (models.Note, error)

CreateNote creates a new note in the local database

func (*LocalDBEngine) DeleteNote

func (e *LocalDBEngine) DeleteNote(noteId utils.NoteId) error

DeleteNote deletes a note by ID from the local database

func (*LocalDBEngine) Initialize

func (e *LocalDBEngine) Initialize(dbPath string, options map[string]string) error

Initialize the engine with a database connection

func (*LocalDBEngine) ListNotes

func (e *LocalDBEngine) ListNotes(tags []string) ([]*models.Note, error)

ListNotes lists all notes in the local database with optional filters

func (*LocalDBEngine) ReadNote

func (e *LocalDBEngine) ReadNote(noteId utils.NoteId) (*models.Note, error)

ReadNote reads a note by ID from the local database

func (*LocalDBEngine) SearchNotes

func (e *LocalDBEngine) SearchNotes(query string) ([]*models.Note, error)

SearchNotes searches notes by content or headline in the local database

func (*LocalDBEngine) UpdateNote

func (e *LocalDBEngine) UpdateNote(noteId utils.NoteId, content, headline string, tags []string) error

UpdateNote updates an existing note in the local database

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL