sqlcgen

package
v1.53.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 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 Client

type Client struct {
	ID             string
	Secret         []byte
	RedirectUris   []byte
	GrantTypes     []byte
	ResponseTypes  []byte
	Scopes         []byte
	Public         bool
	Name           string
	Owner          string
	Trusted        bool
	CreatedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
	Dynamic        bool
	OrganizationID pgtype.UUID
}

type CreateClientParams

type CreateClientParams struct {
	ID             string
	Secret         []byte
	RedirectUris   []byte
	GrantTypes     []byte
	ResponseTypes  []byte
	Scopes         []byte
	Public         bool
	Name           string
	Owner          string
	Trusted        bool
	CreatedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
	Dynamic        bool
	OrganizationID 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 {
	CreateClient(ctx context.Context, arg CreateClientParams) (Client, error)
	DeleteClient(ctx context.Context, id string) (int64, error)
	GetClient(ctx context.Context, id string) (Client, error)
	// created_at is written only on insert; ON CONFLICT leaves the stored value
	// untouched so it remains immutable across updates.
	UpsertClient(ctx context.Context, arg UpsertClientParams) (Client, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateClient

func (q *Queries) CreateClient(ctx context.Context, arg CreateClientParams) (Client, error)

func (*Queries) DeleteClient

func (q *Queries) DeleteClient(ctx context.Context, id string) (int64, error)

func (*Queries) GetClient

func (q *Queries) GetClient(ctx context.Context, id string) (Client, error)

func (*Queries) UpsertClient

func (q *Queries) UpsertClient(ctx context.Context, arg UpsertClientParams) (Client, error)

created_at is written only on insert; ON CONFLICT leaves the stored value untouched so it remains immutable across updates.

func (*Queries) WithTx

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

type UpsertClientParams

type UpsertClientParams struct {
	ID             string
	Secret         []byte
	RedirectUris   []byte
	GrantTypes     []byte
	ResponseTypes  []byte
	Scopes         []byte
	Public         bool
	Name           string
	Owner          string
	Trusted        bool
	CreatedAt      pgtype.Timestamptz
	UpdatedAt      pgtype.Timestamptz
	Dynamic        bool
	OrganizationID pgtype.UUID
}

Jump to

Keyboard shortcuts

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