summaryrefslogtreecommitdiff
path: root/src/index.rs
AgeCommit message (Collapse)AuthorFilesLines
2021-11-20chore: bump dependency on rusqlite to 0.26.1 and fix breakageLars Wirzenius1-4/+4
Sponsored-by: author
2021-10-10chore: drop debug eprintln! callsLars Wirzenius1-2/+0
They're not useful now. Should probably add logging, but that will have to wait until we have a good logging story. Sponsored-by: author
2021-09-18refactor: define a Checksum type and use it where appropriateLars Wirzenius1-7/+16
This will make it harder to compare, say, a SHA-256 and a SHA3, later, when we add more checksum types. Sponsored-by: author
2021-07-21Replace IndexResult with plain ResultAlexander Batischev1-19/+16
2021-03-27refactor: use idiomatic .is_empty() instead of comparing lengthLars Wirzenius1-1/+1
2021-03-27refactor: drop unnecessary clonesLars Wirzenius1-2/+2
2021-03-27refactor: drop unnecessary conversions to the same typeLars Wirzenius1-2/+2
2021-03-27refactor: rename ChunkId::from_str to ChunkId::recreateLars Wirzenius1-1/+1
Less confusion with FromStr::from_str this way.
2021-02-06feat: method for listing ids of chunks from file dataLars Wirzenius1-0/+15
This will be useful soon, to enable us to check how many chunks from file data there is in the repository, to check that an upcoming chunk size setting works. Also add an API call for returning the ids. Note that all of this is meant for testing only. It may be best to disable it in production builds, eventually.
2021-02-04refactor: have per-module error enumsLars Wirzenius1-18/+37
This means that a function that parses step bindings can't return an error that the document is missing a title. Such an error return would be nonsensical, and we use the Rust type system to prevent it, at a small cost of being a bit verbose. Additional benefit is that the library portion of Obnam doesn't return anyhow::Result values anymore.
2021-01-19refactor: use ChunkId directly in errors, instead of StringLars Wirzenius1-2/+2
2021-01-10feat! use SQLite db for chunk index on serverLars Wirzenius1-68/+181
This speeds startup a lot. However, the backup repository needs to be re-created from scratch and internal APIs have change in incompatible ways.
2020-09-19feat: search, delete chunks on chunk serverLars Wirzenius1-0/+33
Also heavily refactor the now-long scenario by splitting out a happy path and some unhappy paths.
2020-09-17feat: add an in-memory index of chunks for searchingLars Wirzenius1-0/+97