custom_types

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v1.6.0

func Register(ctx context.Context, conn RegisterConn) error

Types

type CustomInt

type CustomInt int

CustomInt is a custom type in the same package as the query file.

type CustomTypesRow

type CustomTypesRow struct {
	Column mytype.String `json:"?column?"`
	Int8   CustomInt     `json:"int8"`
}

type DBQuerier

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

func NewQuerier

func NewQuerier(ctx context.Context, conn genericConn) (*DBQuerier, error)

NewQuerier creates a DBQuerier that implements Querier.

func (*DBQuerier) CustomMyInt

func (q *DBQuerier) CustomMyInt(ctx context.Context) (int, error)

CustomMyInt implements Querier.CustomMyInt.

func (*DBQuerier) CustomTypes

func (q *DBQuerier) CustomTypes(ctx context.Context) (CustomTypesRow, error)

CustomTypes implements Querier.CustomTypes.

func (*DBQuerier) IntArray

func (q *DBQuerier) IntArray(ctx context.Context) ([][]int32, error)

IntArray implements Querier.IntArray.

type Querier

type Querier interface {
	CustomTypes(ctx context.Context) (CustomTypesRow, error)

	CustomMyInt(ctx context.Context) (int, error)

	IntArray(ctx context.Context) ([][]int32, error)
}

Querier is a typesafe Go interface backed by SQL queries.

type RegisterConn added in v1.6.0

type RegisterConn interface {
	LoadType(ctx context.Context, typeName string) (*pgtype.Type, error)
	TypeMap() *pgtype.Map
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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