notesdb

package
v0.0.0-...-63fdc9a Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONTENT_SQL = 1
)

Variables

View Source
var (
	//go:embed files/create_notes_tables.sql
	CREATE_NOTES_TABLES_SQL string
)

Functions

func DeleteNote

func DeleteNote(db *sql.DB, id int64) error

func GetNoteContents

func GetNoteContents(db *sql.DB, id int64) ([]byte, error)

func Initialize

func Initialize(path string) (*sql.DB, error)

func SetNoteContents

func SetNoteContents(db *sql.DB, id int64, content []byte) error

func UpdateNote

func UpdateNote(db *sql.DB, id int64, title string) error

Types

type IndexEntry

type IndexEntry struct {
	*notes.Note
	ContentType int
}

func GetNote

func GetNote(db *sql.DB, id int64) (*IndexEntry, error)

func GetNotes

func GetNotes(db *sql.DB) ([]*IndexEntry, error)

func NewNote

func NewNote(db *sql.DB, title string) (*IndexEntry, error)

Jump to

Keyboard shortcuts

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