Documentation
¶
Overview ¶
Package sample holds a representative model used by the codegen tests: the conformance test loads it via go/packages (AST) and via reflection, and the golden test regenerates its quark_gen.go and compares. It is a real, importable package so reflection can see the same types the AST extractor parses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID int64 `db:"id" pk:"true"`
Email string `db:"email"`
Age int `db:"age"`
Balance float64 `db:"balance"`
Active bool `db:"active"`
Settings quark.JSON[string] `db:"settings"`
Nickname quark.Nullable[string] `db:"nickname"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt *time.Time `db:"updated_at"`
// contains filtered or unexported fields
}
Account is a representative model: a primary key, plain scalar columns, a pointer column, and a Quark generic type. The field types are chosen so reflect.Type.String() and go/types render them identically after CanonicalType, exercising the conformance check without hitting the known alias edge cases.
Click to show internal directories.
Click to hide internal directories.