Documentation
¶
Overview ¶
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla - DO NOT EDIT.
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla. DO NOT EDIT.
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla - DO NOT EDIT.
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla. DO NOT EDIT.
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla - DO NOT EDIT.
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla - DO NOT EDIT.
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla - DO NOT EDIT.
Index ¶
- func NewGroupSQL() groupSQL
- func NewUserExternalSQL() userExternalSQL
- func NewUserItemSQL() userItemSQL
- func NewUserSNSSQL() userSNSSQL
- func NewUserSQL() userSQL
- type Group
- type GroupID
- type GroupTable
- func (g *GroupTable) Create(ctx context.Context, db sqlla.DB, input GroupTableCreateInput) (*Group, error)
- func (g *GroupTable) CreateMulti(ctx context.Context, db sqlla.DB, inputs []GroupTableCreateInput) error
- func (g *GroupTable) GetByID(ctx context.Context, db sqlla.DB, c0 GroupID) (*Group, error)
- func (g *GroupTable) GetByIDAndLeaderUserID(ctx context.Context, db sqlla.DB, c0 GroupID, c1 UserId) (*Group, error)
- func (g *GroupTable) ListByIDS(ctx context.Context, db sqlla.DB, cs []GroupID) (Groups, error)
- func (g *GroupTable) ListByLeaderUserIDAndSubLeaderUserID(ctx context.Context, db sqlla.DB, c0 UserId, c1 int64) (Groups, error)
- type GroupTableCreateInput
- type Groups
- type User
- func (u User) DefaultInsertHook(_q userInsertSQL) (userInsertSQL, error)
- func (u User) DefaultInsertOnDuplicateKeyUpdateHook(_q userInsertOnDuplicateKeyUpdateSQL) (userInsertOnDuplicateKeyUpdateSQL, error)
- func (u User) DefaultUpdateHook(q userUpdateSQL) (userUpdateSQL, error)
- func (s User) Delete(db sqlla.DB) (sql.Result, error)
- func (s User) DeleteContext(ctx context.Context, db sqlla.DB) (sql.Result, error)
- func (s User) Select() userSelectSQL
- func (s User) Update() userUpdateSQL
- type UserExternal
- type UserId
- type UserItem
- type UserSNS
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGroupSQL ¶
func NewGroupSQL() groupSQL
func NewUserExternalSQL ¶
func NewUserExternalSQL() userExternalSQL
func NewUserItemSQL ¶
func NewUserItemSQL() userItemSQL
func NewUserSNSSQL ¶
func NewUserSNSSQL() userSNSSQL
func NewUserSQL ¶
func NewUserSQL() userSQL
Types ¶
type Group ¶
type Group struct {
ID GroupID `db:"id,primarykey,autoincrement"`
Name string `db:"name"`
LeaderUserID UserId `db:"leader_user_id"`
SubLeaderUserID sql.Null[int64] `db:"sub_leader_user_id"`
ChildGroupID sql.Null[int64] `db:"child_group_id"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt sql.NullTime `db:"updated_at"`
}
func (Group) DeleteContext ¶
type GroupTable ¶
type GroupTable struct{}
func NewGroupTable ¶
func NewGroupTable() *GroupTable
func (*GroupTable) Create ¶
func (g *GroupTable) Create(ctx context.Context, db sqlla.DB, input GroupTableCreateInput) (*Group, error)
func (*GroupTable) CreateMulti ¶
func (g *GroupTable) CreateMulti(ctx context.Context, db sqlla.DB, inputs []GroupTableCreateInput) error
func (*GroupTable) GetByIDAndLeaderUserID ¶
type GroupTableCreateInput ¶
type User ¶
type User struct {
Id UserId `db:"id,primarykey,autoincrement"`
Name string `db:"name"`
Age sql.NullInt64 `db:"age"`
Rate float64 `db:"rate,default=0"`
IconImage []byte `db:"icon_image"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt mysql.NullTime `db:"updated_at"`
}
+table: user
func (User) DefaultInsertHook ¶
func (User) DefaultInsertOnDuplicateKeyUpdateHook ¶
func (User) DefaultUpdateHook ¶
func (User) DeleteContext ¶
type UserExternal ¶
type UserExternal struct {
Id uint64 `db:"id,primarykey"`
UserId uint64 `db:"user_id"`
IconImage []byte `db:"icon_image,null"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
+table: user_external
func (UserExternal) DeleteContext ¶
func (UserExternal) Select ¶
func (s UserExternal) Select() userExternalSelectSQL
func (UserExternal) Update ¶
func (s UserExternal) Update() userExternalUpdateSQL
type UserItem ¶
type UserItem struct {
Id uint64 `db:"id,primarykey,autoincrement"`
UserId uint64 `db:"user_id"`
ItemId string `db:"item_id"`
IsUsed bool `db:"is_used"`
HasExtension sql.NullBool `db:"has_extension"`
UsedAt sql.NullTime `db:"used_at"`
}
+table: user_item
func (UserItem) DeleteContext ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla - DO NOT EDIT.
|
Code generated by github.com/mackee/go-sqlla/v2/cmd/sqlla - DO NOT EDIT. |
Click to show internal directories.
Click to hide internal directories.