ltree

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: 5 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 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) FindLtreeInput

func (q *DBQuerier) FindLtreeInput(ctx context.Context, inLtree pgtype.Text, inLtreeArray []string) (FindLtreeInputRow, error)

FindLtreeInput implements Querier.FindLtreeInput.

func (*DBQuerier) FindTopScienceChildren

func (q *DBQuerier) FindTopScienceChildren(ctx context.Context) ([]pgtype.Text, error)

FindTopScienceChildren implements Querier.FindTopScienceChildren.

func (*DBQuerier) FindTopScienceChildrenAgg

func (q *DBQuerier) FindTopScienceChildrenAgg(ctx context.Context) ([]pgtype.Text, error)

FindTopScienceChildrenAgg implements Querier.FindTopScienceChildrenAgg.

func (*DBQuerier) InsertSampleData

func (q *DBQuerier) InsertSampleData(ctx context.Context) (pgconn.CommandTag, error)

InsertSampleData implements Querier.InsertSampleData.

type FindLtreeInputRow

type FindLtreeInputRow struct {
	Ltree   pgtype.Text   `json:"ltree"`
	TextArr []pgtype.Text `json:"text_arr"`
}

type Querier

type Querier interface {
	FindTopScienceChildren(ctx context.Context) ([]pgtype.Text, error)

	FindTopScienceChildrenAgg(ctx context.Context) ([]pgtype.Text, error)

	InsertSampleData(ctx context.Context) (pgconn.CommandTag, error)

	FindLtreeInput(ctx context.Context, inLtree pgtype.Text, inLtreeArray []string) (FindLtreeInputRow, 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
}

Jump to

Keyboard shortcuts

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