Documentation
¶
Index ¶
- type Address
- type BadAutoInc
- type BadTimeNoTag
- type LoginForm
- type MCPResponse
- type MockChild
- type MockParent
- type ModelWithIgnored
- type MultiA
- type MultiB
- type NumericTypes
- type Order
- type PlainResponse
- type PointerReceiver
- type RefNoColumn
- type TimeSlotResponse
- type Unsupp
- type User
- type UserForm
- type UserWithJSON
- type WithPointers
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 MCPResponse ¶ added in v0.7.5
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 PlainResponse ¶ added in v0.7.5
ormc:formonly
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 TimeSlotResponse ¶ added in v0.7.1
TimeSlotResponse is a pure transport struct: formonly, no db: tags, no input: tags. Represents the pattern used by MCP tools that return computed results (e.g. availability slots). It must generate a {Name}List for json.Encode slice support even though it has no DB layer. ormc:formonly
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