File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,24 @@ func (s *Store) DebugWith(logger LoggerFunc) *Store {
159159 }).init ()
160160}
161161
162+ // DisableCacher turns off prepared statements.
163+ func (s * Store ) DisableCacher () * Store {
164+ return (& Store {
165+ db : s .db ,
166+ logger : s .logger ,
167+ useCacher : false ,
168+ }).init ()
169+ }
170+
171+ // EnableCacher turns on prepared statements. This is the default.
172+ func (s * Store ) EnableCacher () * Store {
173+ return (& Store {
174+ db : s .db ,
175+ logger : s .logger ,
176+ useCacher : true ,
177+ }).init ()
178+ }
179+
162180// Insert insert the given record in the table, returns error if no-new
163181// record is given. The record id is set if it's empty.
164182func (s * Store ) Insert (schema Schema , record Record ) error {
You can’t perform that action at this time.
0 commit comments