gen_readwise_sqlc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	ID              int64
	Title           string
	Author          string
	Category        string
	Source          string
	NumHighlights   int64
	LastHighlightAt time.Time
	Updated         time.Time
	CoverImageUrl   string
	HighlightsUrl   string
	SourceUrl       string
}

type CreateBookParams

type CreateBookParams struct {
	ID              int64
	Title           string
	Author          string
	Category        string
	Source          string
	NumHighlights   int64
	LastHighlightAt time.Time
	Updated         time.Time
	CoverImageUrl   string
	HighlightsUrl   string
	SourceUrl       string
}

type CreateHighlightParams

type CreateHighlightParams struct {
	ID            int64
	Text          string
	Note          string
	Location      int64
	LocationType  string
	HighlightedAt time.Time
	BookID        int64
	Url           string
	Color         string
	Updated       time.Time
	Tags          string
}

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 Highlight

type Highlight struct {
	ID            int64
	Text          string
	Note          string
	Location      int64
	LocationType  string
	HighlightedAt time.Time
	BookID        int64
	Url           string
	Color         string
	Updated       time.Time
	Tags          string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateBook

func (q *Queries) CreateBook(ctx context.Context, arg CreateBookParams) (Book, error)

func (*Queries) CreateHighlight

func (q *Queries) CreateHighlight(ctx context.Context, arg CreateHighlightParams) (Highlight, error)

func (*Queries) GetBook

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

func (*Queries) GetMostRecentlyUpdatedBook

func (q *Queries) GetMostRecentlyUpdatedBook(ctx context.Context) (Book, error)

func (*Queries) ListBooks

func (q *Queries) ListBooks(ctx context.Context) ([]Book, error)

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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