db

package
v0.0.0-...-64af3df Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOfferParams

type CreateOfferParams struct {
	ID          string
	Title       string
	Company     string
	Location    string
	PostedAt    pgtype.Timestamptz
	Description string
	Source      string
	Url         string
}

type CreateQueryOfferAssocParams

type CreateQueryOfferAssocParams struct {
	QueryID int64
	OfferID string
}

type CreateQueryParams

type CreateQueryParams struct {
	Keywords string
	Location string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetQueryParams

type GetQueryParams struct {
	Keywords string
	Location string
}

type GetQueryScraperParams

type GetQueryScraperParams struct {
	ID          int64
	ScraperName string
}

type GetQueryScraperRow

type GetQueryScraperRow struct {
	ID        int64
	Keywords  string
	Location  string
	CreatedAt pgtype.Timestamptz
	QueriedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
	ScrapedAt pgtype.Timestamptz
}

type Offer

type Offer struct {
	ID          string
	Title       string
	Company     string
	Location    string
	PostedAt    pgtype.Timestamptz
	CreatedAt   pgtype.Timestamptz
	Source      string
	Url         string
	Description string
}

type Queries

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

func New

func New(db DBTX) *Queries

func NewTestDB

func NewTestDB(t testing.TB) (*Queries, func())

func (*Queries) CreateOffer

func (q *Queries) CreateOffer(ctx context.Context, arg *CreateOfferParams) error

func (*Queries) CreateQuery

func (q *Queries) CreateQuery(ctx context.Context, arg *CreateQueryParams) (*Query, error)

func (*Queries) CreateQueryOfferAssoc

func (q *Queries) CreateQueryOfferAssoc(ctx context.Context, arg *CreateQueryOfferAssocParams) error

func (*Queries) DeleteOldOffers

func (q *Queries) DeleteOldOffers(ctx context.Context) error

func (*Queries) DeleteQuery

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

func (*Queries) GetQuery

func (q *Queries) GetQuery(ctx context.Context, arg *GetQueryParams) (*Query, error)

func (*Queries) GetQueryByID

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

func (*Queries) GetQueryScraper

func (q *Queries) GetQueryScraper(ctx context.Context, arg *GetQueryScraperParams) (*GetQueryScraperRow, error)

func (*Queries) ListOffers

func (q *Queries) ListOffers(ctx context.Context, id int64) ([]*Offer, error)

func (*Queries) ListQueries

func (q *Queries) ListQueries(ctx context.Context) ([]*Query, error)

func (*Queries) UpdateQueryQAT

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

func (*Queries) UpdateQueryScrapedAt

func (q *Queries) UpdateQueryScrapedAt(ctx context.Context, arg *UpdateQueryScrapedAtParams) error

func (*Queries) UpdateQueryUAT

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

func (*Queries) WithTx

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

type Query

type Query struct {
	ID        int64
	Keywords  string
	Location  string
	CreatedAt pgtype.Timestamptz
	QueriedAt pgtype.Timestamptz
	UpdatedAt pgtype.Timestamptz
}

type QueryOffer

type QueryOffer struct {
	QueryID int64
	OfferID string
}

type QueryScraperStatus

type QueryScraperStatus struct {
	QueryID     int64
	ScraperName string
	ScrapedAt   pgtype.Timestamptz
}

type UpdateQueryScrapedAtParams

type UpdateQueryScrapedAtParams struct {
	QueryID     int64
	ScraperName string
}

Jump to

Keyboard shortcuts

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