Documentation ¶
Index ¶
- Variables
- type Gender
- type GeomString
- type Org
- func (m *Org) BatchFetchByIDList(db github_com_go_courier_sqlx_v2.DBExecutor, values []uint64) ([]Org, error)
- func (Org) ColDescriptions() map[string][]string
- func (Org) ColRelations() map[string][]string
- func (Org) Comments() map[string]string
- func (m *Org) ConditionByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) github_com_go_courier_sqlx_v2_builder.SqlCondition
- func (m *Org) Count(db github_com_go_courier_sqlx_v2.DBExecutor, ...) (int, error)
- func (m *Org) Create(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *Org) DeleteByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *Org) DeleteByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *Org) FetchByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *Org) FetchByIDForUpdate(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *Org) FieldID() *github_com_go_courier_sqlx_v2_builder.Column
- func (Org) FieldKeyID() string
- func (Org) FieldKeyName() string
- func (Org) FieldKeyUserID() string
- func (m *Org) FieldName() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *Org) FieldUserID() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *Org) IndexFieldNames() []string
- func (m *Org) List(db github_com_go_courier_sqlx_v2.DBExecutor, ...) ([]Org, error)
- func (Org) PrimaryKey() []string
- func (Org) TableDescription() []string
- func (Org) TableName() string
- func (m *Org) UpdateByIDWithMap(db github_com_go_courier_sqlx_v2.DBExecutor, ...) error
- func (m *Org) UpdateByIDWithStruct(db github_com_go_courier_sqlx_v2.DBExecutor, zeroFields ...string) error
- type OrgIterator
- type User
- func (m *User) BatchFetchByIDList(db github_com_go_courier_sqlx_v2.DBExecutor, values []uint64) ([]User, error)
- func (m *User) BatchFetchByNameList(db github_com_go_courier_sqlx_v2.DBExecutor, values []string) ([]User, error)
- func (m *User) BatchFetchByNicknameList(db github_com_go_courier_sqlx_v2.DBExecutor, values []string) ([]User, error)
- func (m *User) BatchFetchByUsernameList(db github_com_go_courier_sqlx_v2.DBExecutor, values []string) ([]User, error)
- func (User) ColDescriptions() map[string][]string
- func (User) ColRelations() map[string][]string
- func (User) Comments() map[string]string
- func (m *User) ConditionByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) github_com_go_courier_sqlx_v2_builder.SqlCondition
- func (m *User) Count(db github_com_go_courier_sqlx_v2.DBExecutor, ...) (int, error)
- func (m *User) Create(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) CreateOnDuplicateWithUpdateFields(db github_com_go_courier_sqlx_v2.DBExecutor, updateFields []string) error
- func (m *User) DeleteByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) DeleteByName(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) DeleteByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) FetchByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) FetchByIDForUpdate(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) FetchByName(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) FetchByNameForUpdate(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) FieldBoolean() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldCreatedAt() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldDeletedAt() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldGender() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldGeom() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldID() *github_com_go_courier_sqlx_v2_builder.Column
- func (User) FieldKeyBoolean() string
- func (User) FieldKeyCreatedAt() string
- func (User) FieldKeyDeletedAt() string
- func (User) FieldKeyGender() string
- func (User) FieldKeyGeom() string
- func (User) FieldKeyID() string
- func (User) FieldKeyName() string
- func (User) FieldKeyNickname() string
- func (User) FieldKeyUpdatedAt() string
- func (User) FieldKeyUsername() string
- func (m *User) FieldName() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldNickname() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldUpdatedAt() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) FieldUsername() *github_com_go_courier_sqlx_v2_builder.Column
- func (m *User) IndexFieldNames() []string
- func (User) Indexes() github_com_go_courier_sqlx_v2_builder.Indexes
- func (m *User) List(db github_com_go_courier_sqlx_v2.DBExecutor, ...) ([]User, error)
- func (User) PrimaryKey() []string
- func (m *User) SoftDeleteByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (m *User) SoftDeleteByName(db github_com_go_courier_sqlx_v2.DBExecutor) error
- func (User) TableName() string
- func (User) UniqueIndexIName() string
- func (User) UniqueIndexes() github_com_go_courier_sqlx_v2_builder.Indexes
- func (m *User) UpdateByIDWithMap(db github_com_go_courier_sqlx_v2.DBExecutor, ...) error
- func (m *User) UpdateByIDWithStruct(db github_com_go_courier_sqlx_v2.DBExecutor, zeroFields ...string) error
- func (m *User) UpdateByNameWithMap(db github_com_go_courier_sqlx_v2.DBExecutor, ...) error
- func (m *User) UpdateByNameWithStruct(db github_com_go_courier_sqlx_v2.DBExecutor, zeroFields ...string) error
- type UserIterator
Constants ¶
This section is empty.
Variables ¶
View Source
var DBTest = sqlx.NewDatabase("test")
View Source
var OrgTable *github_com_go_courier_sqlx_v2_builder.Table
View Source
var UserTable *github_com_go_courier_sqlx_v2_builder.Table
Functions ¶
This section is empty.
Types ¶
type GeomString ¶
type GeomString struct {
V string
}
func (GeomString) DataType ¶
func (GeomString) DataType(driverName string) string
func (*GeomString) Scan ¶
func (g *GeomString) Scan(src interface{}) error
func (GeomString) ValueEx ¶
func (GeomString) ValueEx() string
type Org ¶
type Org struct { ID uint64 `db:"f_id,autoincrement"` Name string `db:"f_name,default=''"` // @rel User.ID // 关联用户 // xxxxx UserID string `db:"user_id"` }
@def primary ID organization
func (*Org) BatchFetchByIDList ¶
func (m *Org) BatchFetchByIDList(db github_com_go_courier_sqlx_v2.DBExecutor, values []uint64) ([]Org, error)
func (Org) ColDescriptions ¶
func (Org) ColRelations ¶
func (*Org) ConditionByStruct ¶
func (m *Org) ConditionByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) github_com_go_courier_sqlx_v2_builder.SqlCondition
func (*Org) Count ¶
func (m *Org) Count(db github_com_go_courier_sqlx_v2.DBExecutor, condition github_com_go_courier_sqlx_v2_builder.SqlCondition, additions ...github_com_go_courier_sqlx_v2_builder.Addition) (int, error)
func (*Org) Create ¶
func (m *Org) Create(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*Org) DeleteByID ¶
func (m *Org) DeleteByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*Org) DeleteByStruct ¶
func (m *Org) DeleteByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*Org) FetchByID ¶
func (m *Org) FetchByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*Org) FetchByIDForUpdate ¶
func (m *Org) FetchByIDForUpdate(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*Org) FieldID ¶
func (m *Org) FieldID() *github_com_go_courier_sqlx_v2_builder.Column
func (Org) FieldKeyID ¶
func (Org) FieldKeyName ¶
func (Org) FieldKeyUserID ¶
func (*Org) FieldName ¶
func (m *Org) FieldName() *github_com_go_courier_sqlx_v2_builder.Column
func (*Org) FieldUserID ¶
func (m *Org) FieldUserID() *github_com_go_courier_sqlx_v2_builder.Column
func (*Org) IndexFieldNames ¶
func (*Org) List ¶
func (m *Org) List(db github_com_go_courier_sqlx_v2.DBExecutor, condition github_com_go_courier_sqlx_v2_builder.SqlCondition, additions ...github_com_go_courier_sqlx_v2_builder.Addition) ([]Org, error)
func (Org) PrimaryKey ¶
func (Org) TableDescription ¶
func (*Org) UpdateByIDWithMap ¶
func (m *Org) UpdateByIDWithMap(db github_com_go_courier_sqlx_v2.DBExecutor, fieldValues github_com_go_courier_sqlx_v2_builder.FieldValues) error
func (*Org) UpdateByIDWithStruct ¶
func (m *Org) UpdateByIDWithStruct(db github_com_go_courier_sqlx_v2.DBExecutor, zeroFields ...string) error
type OrgIterator ¶
type OrgIterator struct { }
func (OrgIterator) New ¶
func (OrgIterator) New() interface{}
func (OrgIterator) Resolve ¶
func (OrgIterator) Resolve(v interface{}) *Org
type User ¶
type User struct { ID uint64 `db:"f_id,autoincrement"` // 姓名 Name string `db:"f_name,default=''"` Username string `db:"f_username,default=''"` Nickname string `db:"f_nickname,default=''"` Gender Gender `db:"f_gender,default='0'"` Boolean bool `db:"f_boolean,default=false"` Geom GeomString `db:"f_geom"` CreatedAt datatypes.Timestamp `db:"f_created_at,default='0'"` UpdatedAt datatypes.Timestamp `db:"f_updated_at,default='0'"` DeletedAt datatypes.Timestamp `db:"f_deleted_at,default='0'"` }
@def primary ID @def index I_nickname/BTREE Nickname @def index I_username Username @def index I_geom/SPATIAL (#Geom) @def unique_index I_name Name
func (*User) BatchFetchByIDList ¶
func (m *User) BatchFetchByIDList(db github_com_go_courier_sqlx_v2.DBExecutor, values []uint64) ([]User, error)
func (*User) BatchFetchByNameList ¶
func (m *User) BatchFetchByNameList(db github_com_go_courier_sqlx_v2.DBExecutor, values []string) ([]User, error)
func (*User) BatchFetchByNicknameList ¶
func (m *User) BatchFetchByNicknameList(db github_com_go_courier_sqlx_v2.DBExecutor, values []string) ([]User, error)
func (*User) BatchFetchByUsernameList ¶
func (m *User) BatchFetchByUsernameList(db github_com_go_courier_sqlx_v2.DBExecutor, values []string) ([]User, error)
func (User) ColDescriptions ¶
func (User) ColRelations ¶
func (*User) ConditionByStruct ¶
func (m *User) ConditionByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) github_com_go_courier_sqlx_v2_builder.SqlCondition
func (*User) Count ¶
func (m *User) Count(db github_com_go_courier_sqlx_v2.DBExecutor, condition github_com_go_courier_sqlx_v2_builder.SqlCondition, additions ...github_com_go_courier_sqlx_v2_builder.Addition) (int, error)
func (*User) Create ¶
func (m *User) Create(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) CreateOnDuplicateWithUpdateFields ¶
func (m *User) CreateOnDuplicateWithUpdateFields(db github_com_go_courier_sqlx_v2.DBExecutor, updateFields []string) error
func (*User) DeleteByID ¶
func (m *User) DeleteByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) DeleteByName ¶
func (m *User) DeleteByName(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) DeleteByStruct ¶
func (m *User) DeleteByStruct(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) FetchByID ¶
func (m *User) FetchByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) FetchByIDForUpdate ¶
func (m *User) FetchByIDForUpdate(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) FetchByName ¶
func (m *User) FetchByName(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) FetchByNameForUpdate ¶
func (m *User) FetchByNameForUpdate(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) FieldBoolean ¶
func (m *User) FieldBoolean() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldCreatedAt ¶
func (m *User) FieldCreatedAt() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldDeletedAt ¶
func (m *User) FieldDeletedAt() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldGender ¶
func (m *User) FieldGender() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldGeom ¶
func (m *User) FieldGeom() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldID ¶
func (m *User) FieldID() *github_com_go_courier_sqlx_v2_builder.Column
func (User) FieldKeyBoolean ¶
func (User) FieldKeyCreatedAt ¶
func (User) FieldKeyDeletedAt ¶
func (User) FieldKeyGender ¶
func (User) FieldKeyGeom ¶
func (User) FieldKeyID ¶
func (User) FieldKeyName ¶
func (User) FieldKeyNickname ¶
func (User) FieldKeyUpdatedAt ¶
func (User) FieldKeyUsername ¶
func (*User) FieldName ¶
func (m *User) FieldName() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldNickname ¶
func (m *User) FieldNickname() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldUpdatedAt ¶
func (m *User) FieldUpdatedAt() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) FieldUsername ¶
func (m *User) FieldUsername() *github_com_go_courier_sqlx_v2_builder.Column
func (*User) IndexFieldNames ¶
func (User) Indexes ¶
func (User) Indexes() github_com_go_courier_sqlx_v2_builder.Indexes
func (*User) List ¶
func (m *User) List(db github_com_go_courier_sqlx_v2.DBExecutor, condition github_com_go_courier_sqlx_v2_builder.SqlCondition, additions ...github_com_go_courier_sqlx_v2_builder.Addition) ([]User, error)
func (User) PrimaryKey ¶
func (*User) SoftDeleteByID ¶
func (m *User) SoftDeleteByID(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (*User) SoftDeleteByName ¶
func (m *User) SoftDeleteByName(db github_com_go_courier_sqlx_v2.DBExecutor) error
func (User) UniqueIndexIName ¶
func (User) UniqueIndexes ¶
func (User) UniqueIndexes() github_com_go_courier_sqlx_v2_builder.Indexes
func (*User) UpdateByIDWithMap ¶
func (m *User) UpdateByIDWithMap(db github_com_go_courier_sqlx_v2.DBExecutor, fieldValues github_com_go_courier_sqlx_v2_builder.FieldValues) error
func (*User) UpdateByIDWithStruct ¶
func (m *User) UpdateByIDWithStruct(db github_com_go_courier_sqlx_v2.DBExecutor, zeroFields ...string) error
func (*User) UpdateByNameWithMap ¶
func (m *User) UpdateByNameWithMap(db github_com_go_courier_sqlx_v2.DBExecutor, fieldValues github_com_go_courier_sqlx_v2_builder.FieldValues) error
func (*User) UpdateByNameWithStruct ¶
func (m *User) UpdateByNameWithStruct(db github_com_go_courier_sqlx_v2.DBExecutor, zeroFields ...string) error
type UserIterator ¶
type UserIterator struct { }
func (UserIterator) New ¶
func (UserIterator) New() interface{}
func (UserIterator) Resolve ¶
func (UserIterator) Resolve(v interface{}) *User
Click to show internal directories.
Click to hide internal directories.