Commit 50bb587 1 parent fd300ca commit 50bb587 Copy full SHA for 50bb587
File tree 1 file changed +5
-8
lines changed
internal/entities/properties/service
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ func (psco *CallOptions) getStoreOrTransaction() db.ExtendQuerier {
50
50
// This field is used to determine if the service call can return stale data or not.
51
51
// This is useful for read calls that can tolerate stale data.
52
52
type ReadOptions struct {
53
- * CallOptions
53
+ CallOptions
54
54
tolerateStaleData bool
55
55
}
56
56
@@ -68,15 +68,12 @@ func (psco *ReadOptions) TolerateStaleData() *ReadOptions {
68
68
return psco
69
69
}
70
70
71
- // WithStoreOrTransaction is a function that sets the StoreOrTransaction field in the ReadOptions struct
71
+ // WithStoreOrTransaction is a function that sets the StoreOrTransaction field in the CallOptions struct
72
72
func (psco * ReadOptions ) WithStoreOrTransaction (storeOrTransaction db.ExtendQuerier ) * ReadOptions {
73
73
if psco == nil {
74
74
return nil
75
75
}
76
- if psco .CallOptions == nil {
77
- psco .CallOptions = CallBuilder ()
78
- }
79
- psco .CallOptions = psco .CallOptions .WithStoreOrTransaction (storeOrTransaction )
76
+ psco .storeOrTransaction = storeOrTransaction
80
77
return psco
81
78
}
82
79
@@ -88,7 +85,7 @@ func (psco *ReadOptions) canTolerateStaleData() bool {
88
85
}
89
86
90
87
func (psco * ReadOptions ) getStoreOrTransaction () db.ExtendQuerier {
91
- if psco == nil || psco . CallOptions == nil {
88
+ if psco == nil {
92
89
return nil
93
90
}
94
91
return psco .CallOptions .getStoreOrTransaction ()
@@ -98,7 +95,7 @@ func (psco *ReadOptions) getPropertiesServiceCallOptions() *CallOptions {
98
95
if psco == nil {
99
96
return nil
100
97
}
101
- return psco .CallOptions
98
+ return & psco .CallOptions
102
99
}
103
100
104
101
type getStoreOrTransaction interface {
You can’t perform that action at this time.
0 commit comments