Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type A2 ¶
A2 : A2, B2, C2, D2 test nested relationship (A2->B2->C2,D2), and non-pointer reference(A2->B2)
type A7 ¶
type A7 struct { ID int64 `sql:"primary key;auto increment"` Name string B []B7 `sql:"relation field:A1"` }
A7 : A7,B7 test functionality of 'relation field' A7 has one-to-many relationship to B7, and B7 has several A7 reverse references
type A9 ¶
type A9 struct { ID int64 `sql:"primary key;auto increment"` Name string B1 []B9 AB []B9 `sql:"relation name:ab_relation"` }
A9 : A9,B9 test many to many relationship with and without a relation name
type All ¶
type All struct { // Annotated Auto int `sql:"primary key;autoincrement"` NotNil string `sql:"not null"` Int int Int8 int8 Int16 int16 Int32 int32 Int64 int64 UInt uint UInt8 uint8 UInt16 uint16 UInt32 uint32 UInt64 uint64 Time time.Time VarCharString string `sql:"type:VARCHAR(100)"` VarCharByte []byte `sql:"type:VARCHAR(100)"` String string Bytes []byte Bool bool PInt *int PInt8 *int8 PInt16 *int16 PInt32 *int32 PInt64 *int64 PUInt *uint PUInt8 *uint8 PUInt16 *uint16 PUInt32 *uint32 PUInt64 *uint64 PTime *time.Time PVarCharString *string `sql:"type:VARCHAR(100)"` PVarCharByte *[]byte `sql:"type:VARCHAR(100)"` PString *string PBytes *[]byte PBool *bool // test a case where field is a reserved name Select int // contains filtered or unexported fields }
All is to test generation of variant fields and types
type B ¶
type B struct { ID int64 `sql:"primary key;auto increment"` Name string Hobbies string CsPointer []*C }
B :
type B3 ¶
type B3 struct { ID int64 `sql:"primary key;auto increment"` Name string A *A3 `sql:"foreign key:./.A3;null"` }
B3 :
type B9 ¶
type B9 struct { ID int64 `sql:"primary key;auto increment"` Name string A1 []A9 BA []A9 `sql:"relation name:ab_relation"` }
B9 :
type Migration0 ¶
type Migration0 struct {
A string
}
Migration0 is for testing migrations
func (*Migration0) TableName ¶
func (*Migration0) TableName() string
TableName returns the table name of Migration0 type
type Migration1 ¶
Migration1 is for testing migrations
func (*Migration1) TableName ¶
func (*Migration1) TableName() string
TableName returns the table name of Migration1 type
type Migration2 ¶
Migration2 is for testing migrations
func (*Migration2) TableName ¶
func (*Migration2) TableName() string
TableName returns the table name of Migration2 type
type Migration3 ¶
Migration3 is for testing migrations
func (*Migration3) TableName ¶
func (*Migration3) TableName() string
TableName returns the table name of Migration3 type