sqlite

package
v0.0.0-...-eaefaf9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage implements the note.Storage interface using SQLite

func NewStorage

func NewStorage(dbPath string) (*Storage, error)

NewStorage creates a new SQLite storage instance

func (*Storage) Close

func (s *Storage) Close() error

Close closes the database connection

func (*Storage) Create

func (s *Storage) Create(ctx context.Context, req note.CreateNoteRequest) (*note.Note, error)

Create creates a new note

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, id int64) error

Delete deletes a note by ID

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, id int64) (*note.Note, error)

Get retrieves a note by ID

func (*Storage) List

List lists notes with pagination and filtering

func (*Storage) Update

func (s *Storage) Update(ctx context.Context, id int64, req note.UpdateNoteRequest) (*note.Note, error)

Update updates an existing note

Jump to

Keyboard shortcuts

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