Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadAutoInc ¶ added in v0.1.0
type BadAutoInc struct {
ID string `db:"autoincrement"`
}
type BadTimeNoTag ¶ added in v0.1.3
type LoginForm ¶ added in v0.2.6
type LoginForm struct {
Email string `input:"email,required"`
Password string `input:"password,required"`
}
ormc:formonly
type MockParent ¶ added in v0.1.4
type MockParent struct {
ID string
Name string
Kids []MockChild // no tag — relation auto-detected via MockChild.MockParentID
}
MockParent / MockChild: relation auto-detection fixture.
type ModelWithIgnored ¶ added in v0.1.3
type NumericTypes ¶ added in v0.1.1
type NumericTypes struct {
IDNumeric int32 `db:"pk,not_null"` // PK + NotNull → bitmask 5
CountUint uint64
RatioF32 float32
}
NumericTypes covers int32, uint64, float32 mapping and bitmask constraints.
type PointerReceiver ¶ added in v0.1.4
PointerReceiver tests that detectTableName handles pointer receivers (*T).
func (*PointerReceiver) ModelName ¶ added in v0.4.0
func (*PointerReceiver) ModelName() string
type RefNoColumn ¶ added in v0.1.1
RefNoColumn covers db:"ref=table" without a specific column (RefColumn must be "").
type UserForm ¶ added in v0.2.6
type UserForm struct {
ID string `db:"pk"`
Name string `input:"name,min=2,max=100"`
Email string `db:"not_null" input:"email,required" json:",omitempty"`
Password string `input:"password,required,min=8"`
Bio string `input:"textarea,tilde,spaces" json:",omitempty"`
Age int64
}
ormc:form
type UserWithJSON ¶ added in v0.2.7
type UserWithJSON struct {
ID string `db:"pk"`
Name string ``
Email string `input:"email"`
Bio string `input:"textarea" json:",omitempty"`
HomeAddr Address ``
}
ormc:form
type WithPointers ¶ added in v0.2.7
Click to show internal directories.
Click to hide internal directories.