Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlitedb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT 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 InsertNoteAttributeParams

type InsertNoteAttributeParams struct {
	NoteID string `db:"note_id"`
	Name   string `db:"name"`
	Value  string `db:"value"`
}

type InsertNoteTagParams

type InsertNoteTagParams struct {
	NoteID   string `db:"note_id"`
	Tag      string `db:"tag"`
	Position int64  `db:"position"`
}

type Note

type Note struct {
	ID        string `db:"id"`
	Kind      string `db:"kind"`
	CreatedAt string `db:"created_at"`
	UpdatedAt string `db:"updated_at"`
}

type NoteAttribute

type NoteAttribute struct {
	NoteID string `db:"note_id"`
	Name   string `db:"name"`
	Value  string `db:"value"`
}

type NoteTag

type NoteTag struct {
	NoteID   string `db:"note_id"`
	Tag      string `db:"tag"`
	Position int64  `db:"position"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteNote

func (q *Queries) DeleteNote(ctx context.Context, id string) error

func (*Queries) DeleteNoteAttributes

func (q *Queries) DeleteNoteAttributes(ctx context.Context, noteID string) error

func (*Queries) DeleteNoteTags

func (q *Queries) DeleteNoteTags(ctx context.Context, noteID string) error

func (*Queries) InsertNoteAttribute

func (q *Queries) InsertNoteAttribute(ctx context.Context, arg InsertNoteAttributeParams) error

func (*Queries) InsertNoteTag

func (q *Queries) InsertNoteTag(ctx context.Context, arg InsertNoteTagParams) error

func (*Queries) JournalExists

func (q *Queries) JournalExists(ctx context.Context, value string) (bool, error)

func (*Queries) JournalID

func (q *Queries) JournalID(ctx context.Context, value string) (string, error)

func (*Queries) ListNoteAttributes

func (q *Queries) ListNoteAttributes(ctx context.Context) ([]NoteAttribute, error)

func (*Queries) ListNoteTags

func (q *Queries) ListNoteTags(ctx context.Context) ([]NoteTag, error)

func (*Queries) ListNotes

func (q *Queries) ListNotes(ctx context.Context) ([]Note, error)

func (*Queries) UpsertNote

func (q *Queries) UpsertNote(ctx context.Context, arg UpsertNoteParams) error

func (*Queries) WithTx

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

type UpsertNoteParams

type UpsertNoteParams struct {
	ID        string `db:"id"`
	Kind      string `db:"kind"`
	CreatedAt string `db:"created_at"`
	UpdatedAt string `db:"updated_at"`
}

Jump to

Keyboard shortcuts

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