db

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ListArchivedNotesRow

type ListArchivedNotesRow struct {
	ID          int64
	Title       string
	Content     string
	ImageData   string
	CreatedAt   string
	UpdatedAt   string
	DeletedAt   sql.NullString
	IsPinned    bool
	IsEncrypted bool
}

type Note

type Note struct {
	ID              int64
	Title           string
	Content         string
	ImageData       string
	CreatedAt       string
	UpdatedAt       string
	DeletedAt       sql.NullString
	EncryptionSalt  sql.NullString
	EncryptionNonce sql.NullString
	IsPinned        bool
	IsEncrypted     bool
}

type NoteTag

type NoteTag struct {
	NoteID int64
	TagID  int64
}

type NotesFt

type NotesFt struct {
	Title   string
	Content string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ListArchivedNotes

func (q *Queries) ListArchivedNotes(ctx context.Context) ([]ListArchivedNotesRow, error)

func (*Queries) ListTags

func (q *Queries) ListTags(ctx context.Context) ([]string, error)

func (*Queries) ListTagsByNoteID

func (q *Queries) ListTagsByNoteID(ctx context.Context, noteID int64) ([]string, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Tag

type Tag struct {
	ID   int64
	Name string
}

Jump to

Keyboard shortcuts

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