sqlc

package
v0.0.23-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateFindingParams

type CreateFindingParams struct {
	InstanceID interface{}
	Details    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 Finding

type Finding struct {
	ID         int64
	InstanceID interface{}
	Details    string
	CreatedAt  sql.NullTime
	UpdatedAt  sql.NullTime
}

type FindingRow

type FindingRow interface {
	GetID() int64
	GetDetails() string
}

FindingRow is an interface to simplify processing of results returned by the queries

type FindingsByIDRow

type FindingsByIDRow struct {
	ID      int64
	Details string
}

func (FindingsByIDRow) GetDetails

func (f FindingsByIDRow) GetDetails() string

func (FindingsByIDRow) GetID

func (f FindingsByIDRow) GetID() int64

type FindingsPageByIDParams

type FindingsPageByIDParams struct {
	InstanceID interface{}
	Limit      int64
	Offset     int64
}

type FindingsPageByIDRow

type FindingsPageByIDRow struct {
	ID      int64
	Details string
}

func (FindingsPageByIDRow) GetDetails

func (f FindingsPageByIDRow) GetDetails() string

func (FindingsPageByIDRow) GetID

func (f FindingsPageByIDRow) GetID() int64

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateFinding

func (q *Queries) CreateFinding(ctx context.Context, arg CreateFindingParams) error

func (*Queries) FindingsByID

func (q *Queries) FindingsByID(ctx context.Context, instanceID interface{}) ([]FindingsByIDRow, error)

func (*Queries) FindingsPageByID

func (q *Queries) FindingsPageByID(ctx context.Context, arg FindingsPageByIDParams) ([]FindingsPageByIDRow, error)

func (*Queries) UpdateFinding

func (q *Queries) UpdateFinding(ctx context.Context, arg UpdateFindingParams) (Finding, error)

func (*Queries) WithTx

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

type UpdateFindingParams

type UpdateFindingParams struct {
	Details    string
	UpdatedAt  sql.NullTime
	InstanceID interface{}
	ID         int64
}

Directories

Path Synopsis
empty file used to track migrations
empty file used to track migrations

Jump to

Keyboard shortcuts

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