sqlc

package
v0.0.0-...-8f0113c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 5 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 {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetProjectRow

type GetProjectRow struct {
	Pk                        int64
	ExternalPrimaryIdentifier string
	ExternalIdentifiers       models.ExternalIdentifiers
	Name                      models.TranslatedString
	Description               models.TranslatedString
	FoundingDate              pgtype.Text
	DissolutionDate           pgtype.Text
	Acronym                   models.Acronym
	EuGrantCall               pgtype.Text
	EuFundingProgramme        pgtype.Text
	CreatedAt                 pgtype.Timestamptz
	UpdatedAt                 pgtype.Timestamptz
}

type Project

type Project struct {
	Pk                        int64
	ExternalPrimaryIdentifier string
	ExternalIdentifiers       models.ExternalIdentifiers
	Name                      models.TranslatedString
	Description               models.TranslatedString
	FoundingDate              pgtype.Text
	DissolutionDate           pgtype.Text
	Acronym                   models.Acronym
	EuGrantCall               pgtype.Text
	EuFundingProgramme        pgtype.Text
	CreatedAt                 pgtype.Timestamptz
	UpdatedAt                 pgtype.Timestamptz
	Ts                        interface{}
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteProject

func (q *Queries) DeleteProject(ctx context.Context, externalPrimaryIdentifier string) (int64, error)

func (*Queries) GetProject

func (q *Queries) GetProject(ctx context.Context, externalPrimaryIdentifier string) (GetProjectRow, error)

func (*Queries) SuggestProjects

func (q *Queries) SuggestProjects(ctx context.Context, toTsquery string) ([]SuggestProjectsRow, error)

func (*Queries) UpsertProject

func (q *Queries) UpsertProject(ctx context.Context, arg UpsertProjectParams) error

func (*Queries) WithTx

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

type SuggestProjectsRow

type SuggestProjectsRow struct {
	Pk                        int64
	ExternalPrimaryIdentifier string
	ExternalIdentifiers       models.ExternalIdentifiers
	Name                      models.TranslatedString
	Description               models.TranslatedString
	FoundingDate              pgtype.Text
	DissolutionDate           pgtype.Text
	Acronym                   models.Acronym
	EuGrantCall               pgtype.Text
	EuFundingProgramme        pgtype.Text
	CreatedAt                 pgtype.Timestamptz
	UpdatedAt                 pgtype.Timestamptz
}

type UpsertProjectParams

type UpsertProjectParams struct {
	ExternalPrimaryIdentifier string
	ExternalIdentifiers       models.ExternalIdentifiers
	Name                      models.TranslatedString
	Description               models.TranslatedString
	FoundingDate              pgtype.Text
	DissolutionDate           pgtype.Text
	Acronym                   models.Acronym
	EuGrantCall               pgtype.Text
	EuFundingProgramme        pgtype.Text
}

Jump to

Keyboard shortcuts

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