sqlc

package
v0.0.0-...-99476fd Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	ID       int64
	ArtistID int64
	Name     string
	Cover    string
}

type Artist

type Artist struct {
	ID    int64
	Name  string
	Image sql.NullString
}

type CreateAlbumParams

type CreateAlbumParams struct {
	ArtistID int64
	Name     string
	Cover    string
}

type CreateArtistParams

type CreateArtistParams struct {
	Name  string
	Image sql.NullString
}

type CreatePersonParams

type CreatePersonParams struct {
	FirstName string
	LastName  string
	FullName  string
	Age       int32
	Salary    pgtype.Numeric
	StartDate time.Time
	Phone     pgtype.JSON
	Languages []string
}

type CreateSongParams

type CreateSongParams struct {
	AlbumID  int64
	ArtistID int64
	Title    string
	Length   float64
	Track    sql.NullInt32
	Path     string
	Mtime    int32
}

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 Person

type Person struct {
	ID        int32
	FirstName string
	LastName  string
	FullName  string
	Age       int32
	Salary    pgtype.Numeric
	StartDate time.Time
	Phone     pgtype.JSON
	Languages []string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateAlbum

func (q *Queries) CreateAlbum(ctx context.Context, arg CreateAlbumParams) (int64, error)

func (*Queries) CreateArtist

func (q *Queries) CreateArtist(ctx context.Context, arg CreateArtistParams) (int64, error)

func (*Queries) CreatePerson

func (q *Queries) CreatePerson(ctx context.Context, arg CreatePersonParams) error

func (*Queries) CreateSong

func (q *Queries) CreateSong(ctx context.Context, arg CreateSongParams) error

func (*Queries) WithTx

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

type Song

type Song struct {
	ID       int64
	AlbumID  int64
	ArtistID int64
	Title    string
	Length   float64
	Track    sql.NullInt32
	Path     string
	Mtime    int32
}

type Test

type Test struct {
	ID         int64
	Uuid       uuid.NullUUID
	Varchar    sql.NullString
	Text       sql.NullString
	Int        sql.NullInt32
	Bigint     sql.NullInt64
	Float      sql.NullFloat64
	Double     sql.NullFloat64
	Decimal    pgtype.Numeric
	Boolean    sql.NullBool
	Inet       pgtype.Inet
	Macaddr    pgtype.Macaddr
	Json       pgtype.JSON
	Jsonb      pgtype.JSONB
	Xml        interface{}
	Date       sql.NullTime
	Time       sql.NullTime
	Timez      sql.NullTime
	Timestamp  sql.NullTime
	Timestampz sql.NullTime
}

Jump to

Keyboard shortcuts

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