{"repo":"nedscode/memdb","free":true,"listed":false,"github":"https://github.com/nedscode/memdb","clone":"git clone https://github.com/nedscode/memdb.git","description":"The memdb library is an in-memory indexable store for go structs. Like a database, but in memory.","language":"Go","stars":20,"topics":["golang","go","database","memory"],"license":"LGPL-3.0","category":"databases-storage","readme_excerpt":"memdb The memdb library is a simple, light-weight, in-memory store for go structs that allows indexing and storage of items as well as configurable item expiry and collection at an interface level. Persistence to disk is optionally available in the persistfile package, should it be required, but has an overhead of having to encode/save the items when inserted/updated and to load the items at creation time. Importantly this memdb library only stores pointers to your original struct, so all benefits and caveats of this fact apply. For example, your original struct remains mutable which can be useful (see caveats below). There is a very low overhead for storing items above that of creating the original struct. If you're looking for a more full featured in-memory database with immutable storage and snapshots/transactions, you may be interested in looking into Hashicorp's go-memdb instead, it does have additional overheads, but less of the caveats. Important caveats As you are working with in-memory objects, it can be easy to overlook that you're also indexing these items in a database. Just like a real database, if you update an item such that it's index keys would change, you must Put it back in to update the items indexes in the database, and also to cause update notifications to be sent (and be persisted to disk if you're using this function). DO NOT under any circumstances update the PRIMARY KEYs (ie keys used to determine the output of the Less() comparator) without first re","default_branch":null,"files":null,"tree":[],"storefront":"/r/nedscode","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nedscode/memdb/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}