sqlcgen

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchUpsertRelationshipsParams

type BatchUpsertRelationshipsParams struct {
	Subjects []pgtype.UUID
	Objects  []pgtype.UUID
	Kinds    []int32
	Roles    []pgtype.UUID
}

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 Querier

type Querier interface {
	BatchUpsertRelationships(ctx context.Context, arg BatchUpsertRelationshipsParams) ([]Relationship, error)
	ReadRelationships(ctx context.Context, arg ReadRelationshipsParams) ([]Relationship, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) BatchUpsertRelationships

func (q *Queries) BatchUpsertRelationships(ctx context.Context, arg BatchUpsertRelationshipsParams) ([]Relationship, error)

func (*Queries) ReadRelationships added in v1.16.0

func (q *Queries) ReadRelationships(ctx context.Context, arg ReadRelationshipsParams) ([]Relationship, error)

func (*Queries) WithTx

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

type ReadRelationshipsParams added in v1.16.0

type ReadRelationshipsParams struct {
	Subject pgtype.UUID
	Objects []pgtype.UUID
	Kinds   []int32
}

type Relationship

type Relationship struct {
	Subject   pgtype.UUID
	Object    pgtype.UUID
	Kind      int32
	EdgeType  int32
	Role      pgtype.UUID
	CreatedAt pgtype.Timestamptz
}

Jump to

Keyboard shortcuts

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