sqlc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 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 CreateUserRow added in v0.3.0

type CreateUserRow struct {
	ID    int32
	Email string
}

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 GetServerStatusRow

type GetServerStatusRow struct {
	DatabaseName  string
	InRecovery    bool
	UptimeSeconds int64
}

type GetUserByEmailRow added in v0.3.0

type GetUserByEmailRow struct {
	ID    int32
	Email string
}

type GetUserByIDRow added in v0.3.0

type GetUserByIDRow struct {
	ID    int32
	Email string
}

type OauthConnection added in v0.3.0

type OauthConnection struct {
	ID             int32
	UserID         int32
	Provider       string
	ProviderUserID string
	CreatedAt      pgtype.Timestamptz
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateUser added in v0.3.0

func (q *Queries) CreateUser(ctx context.Context, email string) (CreateUserRow, error)

func (*Queries) GetServerStatus

func (q *Queries) GetServerStatus(ctx context.Context) (GetServerStatusRow, error)

func (*Queries) GetUserByEmail added in v0.3.0

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (GetUserByEmailRow, error)

func (*Queries) GetUserByID added in v0.3.0

func (q *Queries) GetUserByID(ctx context.Context, id int32) (GetUserByIDRow, error)

func (*Queries) IsVectorExtensionEnabled

func (q *Queries) IsVectorExtensionEnabled(ctx context.Context) (bool, error)

func (*Queries) Ping

func (q *Queries) Ping(ctx context.Context) (int32, error)

func (*Queries) UpsertOAuthConnection added in v0.3.0

func (q *Queries) UpsertOAuthConnection(ctx context.Context, arg UpsertOAuthConnectionParams) (UpsertOAuthConnectionRow, error)

Finds or creates a user by OAuth provider identity.

func (*Queries) WithTx

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

type UpsertOAuthConnectionParams added in v0.3.0

type UpsertOAuthConnectionParams struct {
	Provider       string
	ProviderUserID string
	Email          string
}

type UpsertOAuthConnectionRow added in v0.3.0

type UpsertOAuthConnectionRow struct {
	ID    int32
	Email string
}

type User added in v0.3.0

type User struct {
	ID            int32
	Email         string
	EmailVerified bool
	Name          pgtype.Text
	Status        string
	CreatedAt     pgtype.Timestamptz
	UpdatedAt     pgtype.Timestamptz
}

Jump to

Keyboard shortcuts

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