SpiderOak/crypton — pull request #327 by ecto (2014-10-21 09:25:19+00:00)
Title: Compaction

Not done yet, just PRing this for discussion on the API.

Still needs actual record deletion in the transaction SQL, and obviously tests.

I think I've landed on the most basic API I could come up with. `container.compact(callback)` will create a new ultimate record and perform a transaction almost identical to `add_container_record`. It however will only work if the container is fully saved (you can't compactfully save yet, which would be convenient in some situations). The code could be DRYer, but there will be overlap with `save()` with this method. Does this seem alright?