File tree Expand file tree Collapse file tree 3 files changed +251
-1
lines changed Expand file tree Collapse file tree 3 files changed +251
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,16 @@ func (s *{{.StoreName}}) DebugWith(logger kallax.LoggerFunc) *{{.StoreName}} {
118118 return &{{.StoreName}}{s.Store.DebugWith(logger)}
119119}
120120
121+ // DisableCacher turns off prepared statements, which can be useful in some scenarios.
122+ func (s *{{.StoreName}}) DisableCacher() *{{.StoreName}} {
123+ return &{{.StoreName}}{s.Store.DisableCacher()}
124+ }
125+
126+ // DisableCacher turns on prepared statements. This is the default.
127+ func (s *{{.StoreName}}) EnableCacher() *{{.StoreName}} {
128+ return &{{.StoreName}}{s.Store.EnableCacher()}
129+ }
130+
121131{{if .HasNonInverses}}
122132func (s *{{.StoreName}}) relationshipRecords(record *{{.Name}}) []modelSaveFunc {
123133 var result []modelSaveFunc
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ func (s *Store) DebugWith(logger LoggerFunc) *Store {
159159 }).init ()
160160}
161161
162- // DisableCacher turns off prepared statements.
162+ // DisableCacher turns off prepared statements, which can be useful in some scenarios .
163163func (s * Store ) DisableCacher () * Store {
164164 return (& Store {
165165 db : s .db ,
You can’t perform that action at this time.
0 commit comments