|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
// Code generated by Yesql. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// - Yesql v1.5.0
|
|
|
|
|
// - Yesql v1.8.0
|
|
|
|
|
|
|
|
|
|
package cc
|
|
|
|
|
|
|
|
|
@ -8,7 +8,7 @@ import (
|
|
|
|
|
"context"
|
|
|
|
|
|
|
|
|
|
"github.com/alimy/yesql"
|
|
|
|
|
"github.com/jmoiron/sqlx"
|
|
|
|
|
"github.com/bitbus/sqlx"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
@ -178,6 +178,26 @@ const (
|
|
|
|
|
_Wallet_NewPostBill = `INSERT INTO @wallet_statement (post_id, user_id, change_amount, balance_snapshot, reason, created_on) VALUES (?, ?, ?, ?, ?, ?)`
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// PreparexContext enhances the Conn interface with context.
|
|
|
|
|
type PreparexContext interface {
|
|
|
|
|
// PrepareContext prepares a statement.
|
|
|
|
|
// The provided context is used for the preparation of the statement, not for
|
|
|
|
|
// the execution of the statement.
|
|
|
|
|
PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error)
|
|
|
|
|
|
|
|
|
|
// PrepareNamedContext returns an sqlx.NamedStmt
|
|
|
|
|
PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)
|
|
|
|
|
|
|
|
|
|
// Rebind rebind query to adapte SQL Driver
|
|
|
|
|
Rebind(query string) string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// PreparexBuilder preparex builder interface for sqlx
|
|
|
|
|
type PreparexBuilder interface {
|
|
|
|
|
PreparexContext
|
|
|
|
|
QueryHook(query string) string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Yesql struct {
|
|
|
|
|
TagsFromNames string `yesql:"tags_from_names"`
|
|
|
|
|
UpdateTagQuote *sqlx.Stmt `yesql:"update_tag_quote"`
|
|
|
|
@ -425,7 +445,7 @@ type Wallet struct {
|
|
|
|
|
NewPostBill *sqlx.Stmt `yesql:"new_post_bill"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildYesql(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Yesql, err error) {
|
|
|
|
|
func BuildYesql(p PreparexBuilder, ctx ...context.Context) (obj *Yesql, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -441,7 +461,7 @@ func BuildYesql(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Yesql, er
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildAuthorizationManage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *AuthorizationManage, err error) {
|
|
|
|
|
func BuildAuthorizationManage(p PreparexBuilder, ctx ...context.Context) (obj *AuthorizationManage, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -461,7 +481,7 @@ func BuildAuthorizationManage(p yesql.PreparexBuilder, ctx ...context.Context) (
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildComment(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Comment, err error) {
|
|
|
|
|
func BuildComment(p PreparexBuilder, ctx ...context.Context) (obj *Comment, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -489,7 +509,7 @@ func BuildComment(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Comment
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildCommentManage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *CommentManage, err error) {
|
|
|
|
|
func BuildCommentManage(p PreparexBuilder, ctx ...context.Context) (obj *CommentManage, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -539,7 +559,7 @@ func BuildCommentManage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *C
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildContactManager(p yesql.PreparexBuilder, ctx ...context.Context) (obj *ContactManager, err error) {
|
|
|
|
|
func BuildContactManager(p PreparexBuilder, ctx ...context.Context) (obj *ContactManager, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -586,7 +606,7 @@ func BuildContactManager(p yesql.PreparexBuilder, ctx ...context.Context) (obj *
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildFollowingManager(p yesql.PreparexBuilder, ctx ...context.Context) (obj *FollowingManager, err error) {
|
|
|
|
|
func BuildFollowingManager(p PreparexBuilder, ctx ...context.Context) (obj *FollowingManager, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -618,7 +638,7 @@ func BuildFollowingManager(p yesql.PreparexBuilder, ctx ...context.Context) (obj
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildMessage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Message, err error) {
|
|
|
|
|
func BuildMessage(p PreparexBuilder, ctx ...context.Context) (obj *Message, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -647,7 +667,7 @@ func BuildMessage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Message
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildSecurity(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Security, err error) {
|
|
|
|
|
func BuildSecurity(p PreparexBuilder, ctx ...context.Context) (obj *Security, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -667,7 +687,7 @@ func BuildSecurity(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Securi
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildShipIndex(p yesql.PreparexBuilder, ctx ...context.Context) (obj *ShipIndex, err error) {
|
|
|
|
|
func BuildShipIndex(p PreparexBuilder, ctx ...context.Context) (obj *ShipIndex, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -693,14 +713,14 @@ func BuildShipIndex(p yesql.PreparexBuilder, ctx ...context.Context) (obj *ShipI
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildShipIndexA(p yesql.PreparexBuilder) (obj *ShipIndexA, err error) {
|
|
|
|
|
func BuildShipIndexA(p PreparexBuilder) (obj *ShipIndexA, err error) {
|
|
|
|
|
obj = &ShipIndexA{
|
|
|
|
|
UserInfo: p.QueryHook(_ShipIndexA_UserInfo),
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildSimpleIndex(p yesql.PreparexBuilder, ctx ...context.Context) (obj *SimpleIndex, err error) {
|
|
|
|
|
func BuildSimpleIndex(p PreparexBuilder, ctx ...context.Context) (obj *SimpleIndex, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -717,14 +737,14 @@ func BuildSimpleIndex(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Sim
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildSimpleIndexA(p yesql.PreparexBuilder) (obj *SimpleIndexA, err error) {
|
|
|
|
|
func BuildSimpleIndexA(p PreparexBuilder) (obj *SimpleIndexA, err error) {
|
|
|
|
|
obj = &SimpleIndexA{
|
|
|
|
|
UserInfo: p.QueryHook(_SimpleIndexA_UserInfo),
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildTopicA(p yesql.PreparexBuilder, ctx ...context.Context) (obj *TopicA, err error) {
|
|
|
|
|
func BuildTopicA(p PreparexBuilder, ctx ...context.Context) (obj *TopicA, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -756,7 +776,7 @@ func BuildTopicA(p yesql.PreparexBuilder, ctx ...context.Context) (obj *TopicA,
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildTweet(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Tweet, err error) {
|
|
|
|
|
func BuildTweet(p PreparexBuilder, ctx ...context.Context) (obj *Tweet, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -860,7 +880,7 @@ func BuildTweet(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Tweet, er
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildTweetA(p yesql.PreparexBuilder) (obj *TweetA, err error) {
|
|
|
|
|
func BuildTweetA(p PreparexBuilder) (obj *TweetA, err error) {
|
|
|
|
|
obj = &TweetA{
|
|
|
|
|
AttachmentByTweetId: p.QueryHook(_TweetA_AttachmentByTweetId),
|
|
|
|
|
FavoriteByTweetId: p.QueryHook(_TweetA_FavoriteByTweetId),
|
|
|
|
@ -878,7 +898,7 @@ func BuildTweetA(p yesql.PreparexBuilder) (obj *TweetA, err error) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildTweetHelp(p yesql.PreparexBuilder) (obj *TweetHelp, err error) {
|
|
|
|
|
func BuildTweetHelp(p PreparexBuilder) (obj *TweetHelp, err error) {
|
|
|
|
|
obj = &TweetHelp{
|
|
|
|
|
GetPostContentByIds: p.QueryHook(_TweetHelp_GetPostContentByIds),
|
|
|
|
|
GetUsersByIds: p.QueryHook(_TweetHelp_GetUsersByIds),
|
|
|
|
@ -886,14 +906,14 @@ func BuildTweetHelp(p yesql.PreparexBuilder) (obj *TweetHelp, err error) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildTweetHelpA(p yesql.PreparexBuilder) (obj *TweetHelpA, err error) {
|
|
|
|
|
func BuildTweetHelpA(p PreparexBuilder) (obj *TweetHelpA, err error) {
|
|
|
|
|
obj = &TweetHelpA{
|
|
|
|
|
UserInfo: p.QueryHook(_TweetHelpA_UserInfo),
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildTweetManage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *TweetManage, err error) {
|
|
|
|
|
func BuildTweetManage(p PreparexBuilder, ctx ...context.Context) (obj *TweetManage, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -959,14 +979,14 @@ func BuildTweetManage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Twe
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildTweetManageA(p yesql.PreparexBuilder) (obj *TweetManageA, err error) {
|
|
|
|
|
func BuildTweetManageA(p PreparexBuilder) (obj *TweetManageA, err error) {
|
|
|
|
|
obj = &TweetManageA{
|
|
|
|
|
UserInfo: p.QueryHook(_TweetManageA_UserInfo),
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildUserManage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *UserManage, err error) {
|
|
|
|
|
func BuildUserManage(p PreparexBuilder, ctx ...context.Context) (obj *UserManage, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
@ -1000,7 +1020,7 @@ func BuildUserManage(p yesql.PreparexBuilder, ctx ...context.Context) (obj *User
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BuildWallet(p yesql.PreparexBuilder, ctx ...context.Context) (obj *Wallet, err error) {
|
|
|
|
|
func BuildWallet(p PreparexBuilder, ctx ...context.Context) (obj *Wallet, err error) {
|
|
|
|
|
var c context.Context
|
|
|
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
|
|
|
c = ctx[0]
|
|
|
|
|