WithInMemory is an option to configure Storage to use an in memory DB
()
| 85 | |
| 86 | // WithInMemory is an option to configure Storage to use an in memory DB |
| 87 | func WithInMemory() StorageOption { |
| 88 | return func(s *storage) { |
| 89 | s.dialector = sqlite.Open(":memory:?_pragma=foreign_keys(1)") |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | // WithMaxOpenConns is an option to configure the maximum number of open connections |
| 94 | func WithMaxOpenConns(max int) StorageOption { |
no outgoing calls