fix: some api bug
This commit is contained in:
@@ -12,6 +12,10 @@ import (
|
||||
// Tx is a transactional client that is created by calling Client.Tx().
|
||||
type Tx struct {
|
||||
config
|
||||
// UserFollows is the client for interacting with the UserFollows builders.
|
||||
UserFollows *UserFollowsClient
|
||||
// UserPreferences is the client for interacting with the UserPreferences builders.
|
||||
UserPreferences *UserPreferencesClient
|
||||
// Users is the client for interacting with the Users builders.
|
||||
Users *UsersClient
|
||||
|
||||
@@ -145,6 +149,8 @@ func (tx *Tx) Client() *Client {
|
||||
}
|
||||
|
||||
func (tx *Tx) init() {
|
||||
tx.UserFollows = NewUserFollowsClient(tx.config)
|
||||
tx.UserPreferences = NewUserPreferencesClient(tx.config)
|
||||
tx.Users = NewUsersClient(tx.config)
|
||||
}
|
||||
|
||||
@@ -155,7 +161,7 @@ func (tx *Tx) init() {
|
||||
// of them in order to commit or rollback the transaction.
|
||||
//
|
||||
// If a closed transaction is embedded in one of the generated entities, and the entity
|
||||
// applies a query, for example: Users.QueryXXX(), the query will be executed
|
||||
// applies a query, for example: UserFollows.QueryXXX(), the query will be executed
|
||||
// through the driver which created this transaction.
|
||||
//
|
||||
// Note that txDriver is not goroutine safe.
|
||||
|
||||
Reference in New Issue
Block a user