pk

package
v0.0.0-...-280e60f Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 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 Car

type Car struct {
	ID        PK `sql:",pk"`
	No        string
	Color     Color
	ManucDate time.Time
}

func (*Car) Addrs

func (v *Car) Addrs() []any

func (Car) Columns

func (Car) Columns() []string

func (Car) FindOneByPKStmt

func (v Car) FindOneByPKStmt() (string, []any)

func (Car) GetColor

func (v Car) GetColor() sequel.ColumnValuer[Color]

func (Car) GetID

func (v Car) GetID() sequel.ColumnValuer[PK]

func (Car) GetManucDate

func (v Car) GetManucDate() sequel.ColumnValuer[time.Time]

func (Car) GetNo

func (v Car) GetNo() sequel.ColumnValuer[string]

func (Car) HasPK

func (Car) HasPK()

func (Car) InsertOneStmt

func (v Car) InsertOneStmt() (string, []any)

func (Car) InsertPlaceholders

func (Car) InsertPlaceholders(row int) string

func (Car) PK

func (v Car) PK() (string, int, any)

func (Car) TableName

func (Car) TableName() string

func (Car) UpdateOneByPKStmt

func (v Car) UpdateOneByPKStmt() (string, []any)

func (Car) Values

func (v Car) Values() []any

type Color

type Color int
const (
	Red Color = iota
	White
)

type House

type House struct {
	ID uint `sql:",pk"`
	No string
}

func (*House) Addrs

func (v *House) Addrs() []any

func (House) Columns

func (House) Columns() []string

func (House) FindOneByPKStmt

func (v House) FindOneByPKStmt() (string, []any)

func (House) GetID

func (v House) GetID() sequel.ColumnValuer[uint]

func (House) GetNo

func (v House) GetNo() sequel.ColumnValuer[string]

func (House) HasPK

func (House) HasPK()

func (House) InsertOneStmt

func (v House) InsertOneStmt() (string, []any)

func (House) InsertPlaceholders

func (House) InsertPlaceholders(row int) string

func (House) PK

func (v House) PK() (string, int, any)

func (House) TableName

func (House) TableName() string

func (House) UpdateOneByPKStmt

func (v House) UpdateOneByPKStmt() (string, []any)

func (House) Values

func (v House) Values() []any

type LongText

type LongText string

type PK

type PK int64

func (PK) Value

func (pk PK) Value() (driver.Value, error)

type User

type User struct {
	ID    int64 `sql:",pk"`
	Name  LongText
	Age   uint8
	Email string
}

func (*User) Addrs

func (v *User) Addrs() []any

func (User) Columns

func (User) Columns() []string

func (User) FindOneByPKStmt

func (v User) FindOneByPKStmt() (string, []any)

func (User) GetAge

func (v User) GetAge() sequel.ColumnValuer[uint8]

func (User) GetEmail

func (v User) GetEmail() sequel.ColumnValuer[string]

func (User) GetID

func (v User) GetID() sequel.ColumnValuer[int64]

func (User) GetName

func (v User) GetName() sequel.ColumnValuer[LongText]

func (User) HasPK

func (User) HasPK()

func (User) InsertOneStmt

func (v User) InsertOneStmt() (string, []any)

func (User) InsertPlaceholders

func (User) InsertPlaceholders(row int) string

func (User) PK

func (v User) PK() (string, int, any)

func (User) TableName

func (User) TableName() string

func (User) UpdateOneByPKStmt

func (v User) UpdateOneByPKStmt() (string, []any)

func (User) Values

func (v User) Values() []any

Directories

Path Synopsis
int

Jump to

Keyboard shortcuts

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