fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
+7 -1
View File
@@ -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.