db

package
v0.0.0-...-be31693 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 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 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 InsertUserParams

type InsertUserParams struct {
	ID       string
	UserName string
	Email    string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) FindUserByID

func (q *Queries) FindUserByID(ctx context.Context, id string) (User, error)

func (*Queries) InsertUser

func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) (User, error)

func (*Queries) WithTx

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

type SchemaMigration

type SchemaMigration struct {
	Version string
}

type User

type User struct {
	// UserID
	ID string
	// UserName
	UserName string
	// Email Address
	Email string
	// Creation Date
	CreatedAt pgtype.Timestamp
	// Last Update Date
	UpdatedAt pgtype.Timestamp
}

User Information

Jump to

Keyboard shortcuts

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