notes

package
v0.0.0-...-f388f23 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 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 CreateNoteParams

type CreateNoteParams struct {
	Name    string
	Content sql.NullString
}

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 ListNotesParams

type ListNotesParams struct {
	Filter string
	Offset int64
	Limit  int64
}

type Note

type Note struct {
	ID        int64
	Name      string
	Content   sql.NullString
	CreatedAt sql.NullTime
	UpdatedAt sql.NullTime
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateNote

func (q *Queries) CreateNote(ctx context.Context, arg CreateNoteParams) (Note, error)

func (*Queries) DeleteNote

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

func (*Queries) GetNote

func (q *Queries) GetNote(ctx context.Context, id int64) (Note, error)

@formatter:off

func (*Queries) ListNotes

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

func (*Queries) UpdateNote

func (q *Queries) UpdateNote(ctx context.Context, arg UpdateNoteParams) (Note, error)

func (*Queries) WithTx

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

type UpdateNoteParams

type UpdateNoteParams struct {
	Name    string
	Content sql.NullString
	ID      int64
}

Jump to

Keyboard shortcuts

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