Documentation ¶
Overview ¶
Package memdb contains a write-through cached storage. It will cache everything relevant in memory (either all data in the storage or parts of it) and serve read requests from memory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveData ¶
MoveData moves data from one database to another. Tables must exist in both source and destination. This is not thread safe and should not be performed on a live destination database. Use the clause string to limit the selection. The clause is concatenated at the end of the SELECT so it's a prime candidate for SQL injection. DO NOT USE THIS in external APIs. Ever.
func NewCacheLookup ¶
func NewCacheLookup(store storage.DataStore) sqlstore.InternalLookups
NewCacheLookup creates an internal lookup implementation that uses the local cached database rather than an external one. This creates dummy transactions for the local *sql.DB instance and calls the internal utility lookups directly. It's a bit convoluted and
func PrimeAPNCache ¶
PrimeAPNCache primes the APN cached storage
func PrimeMemoryCache ¶
PrimeMemoryCache primes the data store with data from a backend store. All data is read into memory and a memDB implementation is returned. The existing data that is created during schema creation must be removed before it is transplanted across.
Types ¶
This section is empty.