Documentation ¶
Index ¶
- Variables
- type Gender
- type GeomString
- type User
- func (m *User) BatchFetchByGeomList(db *github_com_go_courier_sqlx.DB, values []GeomString) ([]User, error)
- func (m *User) BatchFetchByIDList(db *github_com_go_courier_sqlx.DB, values []uint64) ([]User, error)
- func (m *User) BatchFetchByNameList(db *github_com_go_courier_sqlx.DB, values []string) ([]User, error)
- func (m *User) BatchFetchByNicknameList(db *github_com_go_courier_sqlx.DB, values []string) ([]User, error)
- func (m *User) BatchFetchByUsernameList(db *github_com_go_courier_sqlx.DB, values []string) ([]User, error)
- func (User) Comments() map[string]string
- func (m *User) ConditionByStruct() *github_com_go_courier_sqlx_builder.Condition
- func (m *User) Count(db *github_com_go_courier_sqlx.DB, ...) (int, error)
- func (m *User) Create(db *github_com_go_courier_sqlx.DB) error
- func (m *User) CreateOnDuplicateWithUpdateFields(db *github_com_go_courier_sqlx.DB, updateFields []string) error
- func (User) D() *github_com_go_courier_sqlx.Database
- func (m *User) DeleteByID(db *github_com_go_courier_sqlx.DB) error
- func (m *User) DeleteByName(db *github_com_go_courier_sqlx.DB) error
- func (m *User) DeleteByStruct(db *github_com_go_courier_sqlx.DB) error
- func (m *User) FetchByID(db *github_com_go_courier_sqlx.DB) error
- func (m *User) FetchByIDForUpdate(db *github_com_go_courier_sqlx.DB) error
- func (m *User) FetchByName(db *github_com_go_courier_sqlx.DB) error
- func (m *User) FetchByNameForUpdate(db *github_com_go_courier_sqlx.DB) error
- func (m *User) FieldBirthday() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldBoolean() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldCreatedAt() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldEnabled() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldGender() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldGeom() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldID() *github_com_go_courier_sqlx_builder.Column
- func (User) FieldKeyBirthday() string
- func (User) FieldKeyBoolean() string
- func (User) FieldKeyCreatedAt() string
- func (User) FieldKeyEnabled() 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_builder.Column
- func (m *User) FieldNickname() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldUpdatedAt() *github_com_go_courier_sqlx_builder.Column
- func (m *User) FieldUsername() *github_com_go_courier_sqlx_builder.Column
- func (m *User) IndexFieldNames() []string
- func (User) Indexes() github_com_go_courier_sqlx_builder.Indexes
- func (m *User) List(db *github_com_go_courier_sqlx.DB, ...) ([]User, error)
- func (User) PrimaryKey() github_com_go_courier_sqlx_builder.FieldNames
- func (m *User) SoftDeleteByID(db *github_com_go_courier_sqlx.DB) error
- func (m *User) SoftDeleteByName(db *github_com_go_courier_sqlx.DB) error
- func (User) SpatialIndexes() github_com_go_courier_sqlx_builder.Indexes
- func (User) T() *github_com_go_courier_sqlx_builder.Table
- func (User) TableName() string
- func (User) UniqueIndexes() github_com_go_courier_sqlx_builder.Indexes
- func (m *User) UpdateByIDWithMap(db *github_com_go_courier_sqlx.DB, ...) error
- func (m *User) UpdateByIDWithStruct(db *github_com_go_courier_sqlx.DB, zeroFields ...string) error
- func (m *User) UpdateByNameWithMap(db *github_com_go_courier_sqlx.DB, ...) error
- func (m *User) UpdateByNameWithStruct(db *github_com_go_courier_sqlx.DB, zeroFields ...string) error
- type User2
Constants ¶
This section is empty.
Variables ¶
View Source
var DBTest = sqlx.NewDatabase("test")
View Source
var UserTable *github_com_go_courier_sqlx_builder.Table
Functions ¶
This section is empty.
Types ¶
type GeomString ¶ added in v1.1.0
type GeomString struct {
V string
}
func (GeomString) DataType ¶ added in v1.1.1
func (GeomString) DataType() string
func (*GeomString) Scan ¶ added in v1.1.1
func (g *GeomString) Scan(src interface{}) error
func (GeomString) ValueEx ¶ added in v1.1.0
func (GeomString) ValueEx() string
type User ¶
type User struct { ID uint64 `db:"F_id" json:"-" sql:"bigint unsigned NOT NULL DEFAULT '0'"` // 姓名 Name string `db:"F_name" json:"name" sql:"varchar(255) NOT NULL DEFAULT ''"` Username string `db:"F_username" json:"username" sql:"varchar(255) NOT NULL DEFAULT ''"` Nickname string `db:"F_nickname" json:"nickname" sql:"varchar(255) NOT NULL DEFAULT ''"` Gender Gender `db:"F_gender" json:"gender" sql:"int NOT NULL DEFAULT '0'"` Birthday datatypes.MySQLDatetime `db:"F_birthday" json:"birthday" sql:"datetime NOT NULL"` Boolean bool `db:"F_boolean" json:"boolean" sql:"tinyint(1) NOT NULL DEFAULT '0'"` Geom GeomString `db:"F_geom" json:"geom" sql:"geometry NOT NULL"` CreatedAt datatypes.MySQLTimestamp `db:"F_created_at" json:"createdAt" sql:"bigint NOT NULL DEFAULT '0'"` UpdatedAt datatypes.MySQLTimestamp `db:"F_updated_at" json:"updatedAt" sql:"bigint NOT NULL DEFAULT '0'"` Enabled datatypes.Bool `db:"F_enabled" json:"enabled" sql:"int NOT NULL DEFAULT '0'"` }
@def primary ID @def index I_nickname Nickname @def index I_username Username @def unique_index I_name Name @def spatial_index I_geom Geom
func (*User) BatchFetchByGeomList ¶ added in v1.1.0
func (m *User) BatchFetchByGeomList(db *github_com_go_courier_sqlx.DB, values []GeomString) ([]User, error)
func (*User) BatchFetchByIDList ¶
func (*User) BatchFetchByNameList ¶
func (*User) BatchFetchByNicknameList ¶
func (*User) BatchFetchByUsernameList ¶
func (*User) ConditionByStruct ¶
func (m *User) ConditionByStruct() *github_com_go_courier_sqlx_builder.Condition
func (*User) Count ¶
func (m *User) Count(db *github_com_go_courier_sqlx.DB, condition *github_com_go_courier_sqlx_builder.Condition, additions ...github_com_go_courier_sqlx_builder.Addition) (int, error)
func (*User) CreateOnDuplicateWithUpdateFields ¶
func (m *User) CreateOnDuplicateWithUpdateFields(db *github_com_go_courier_sqlx.DB, updateFields []string) error
func (User) D ¶
func (User) D() *github_com_go_courier_sqlx.Database
func (*User) DeleteByID ¶
func (m *User) DeleteByID(db *github_com_go_courier_sqlx.DB) error
func (*User) DeleteByName ¶
func (m *User) DeleteByName(db *github_com_go_courier_sqlx.DB) error
func (*User) DeleteByStruct ¶
func (m *User) DeleteByStruct(db *github_com_go_courier_sqlx.DB) error
func (*User) FetchByIDForUpdate ¶
func (m *User) FetchByIDForUpdate(db *github_com_go_courier_sqlx.DB) error
func (*User) FetchByName ¶
func (m *User) FetchByName(db *github_com_go_courier_sqlx.DB) error
func (*User) FetchByNameForUpdate ¶
func (m *User) FetchByNameForUpdate(db *github_com_go_courier_sqlx.DB) error
func (*User) FieldBirthday ¶
func (m *User) FieldBirthday() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldBoolean ¶
func (m *User) FieldBoolean() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldCreatedAt ¶
func (m *User) FieldCreatedAt() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldEnabled ¶
func (m *User) FieldEnabled() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldGender ¶
func (m *User) FieldGender() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldGeom ¶ added in v1.1.0
func (m *User) FieldGeom() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldID ¶
func (m *User) FieldID() *github_com_go_courier_sqlx_builder.Column
func (User) FieldKeyBirthday ¶
func (User) FieldKeyBoolean ¶
func (User) FieldKeyCreatedAt ¶
func (User) FieldKeyEnabled ¶
func (User) FieldKeyGender ¶
func (User) FieldKeyGeom ¶ added in v1.1.0
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_builder.Column
func (*User) FieldNickname ¶
func (m *User) FieldNickname() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldUpdatedAt ¶
func (m *User) FieldUpdatedAt() *github_com_go_courier_sqlx_builder.Column
func (*User) FieldUsername ¶
func (m *User) FieldUsername() *github_com_go_courier_sqlx_builder.Column
func (*User) IndexFieldNames ¶
func (User) Indexes ¶
func (User) Indexes() github_com_go_courier_sqlx_builder.Indexes
func (*User) List ¶
func (m *User) List(db *github_com_go_courier_sqlx.DB, condition *github_com_go_courier_sqlx_builder.Condition, additions ...github_com_go_courier_sqlx_builder.Addition) ([]User, error)
func (User) PrimaryKey ¶
func (User) PrimaryKey() github_com_go_courier_sqlx_builder.FieldNames
func (*User) SoftDeleteByID ¶
func (m *User) SoftDeleteByID(db *github_com_go_courier_sqlx.DB) error
func (*User) SoftDeleteByName ¶
func (m *User) SoftDeleteByName(db *github_com_go_courier_sqlx.DB) error
func (User) SpatialIndexes ¶ added in v1.1.0
func (User) SpatialIndexes() github_com_go_courier_sqlx_builder.Indexes
func (User) T ¶
func (User) T() *github_com_go_courier_sqlx_builder.Table
func (User) UniqueIndexes ¶
func (User) UniqueIndexes() github_com_go_courier_sqlx_builder.Indexes
func (*User) UpdateByIDWithMap ¶
func (m *User) UpdateByIDWithMap(db *github_com_go_courier_sqlx.DB, fieldValues github_com_go_courier_sqlx_builder.FieldValues) error
func (*User) UpdateByIDWithStruct ¶
func (m *User) UpdateByIDWithStruct(db *github_com_go_courier_sqlx.DB, zeroFields ...string) error
func (*User) UpdateByNameWithMap ¶
func (m *User) UpdateByNameWithMap(db *github_com_go_courier_sqlx.DB, fieldValues github_com_go_courier_sqlx_builder.FieldValues) error
func (*User) UpdateByNameWithStruct ¶
func (m *User) UpdateByNameWithStruct(db *github_com_go_courier_sqlx.DB, zeroFields ...string) error
Click to show internal directories.
Click to hide internal directories.