Add the event service
This commit is contained in:
+4
-1
@@ -12,6 +12,8 @@ import (
|
||||
// Tx is a transactional client that is created by calling Client.Tx().
|
||||
type Tx struct {
|
||||
config
|
||||
// Event is the client for interacting with the Event builders.
|
||||
Event *EventClient
|
||||
// GeneralQueue is the client for interacting with the GeneralQueue builders.
|
||||
GeneralQueue *GeneralQueueClient
|
||||
// GeneralQueueState is the client for interacting with the GeneralQueueState builders.
|
||||
@@ -147,6 +149,7 @@ func (tx *Tx) Client() *Client {
|
||||
}
|
||||
|
||||
func (tx *Tx) init() {
|
||||
tx.Event = NewEventClient(tx.config)
|
||||
tx.GeneralQueue = NewGeneralQueueClient(tx.config)
|
||||
tx.GeneralQueueState = NewGeneralQueueStateClient(tx.config)
|
||||
}
|
||||
@@ -158,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: GeneralQueue.QueryXXX(), the query will be executed
|
||||
// applies a query, for example: Event.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