Commit graph

121 commits

Author SHA1 Message Date
Dustin J. Mitchell
a76d7580ce cargo fmt 2021-09-26 13:59:58 -04:00
Dustin J. Mitchell
255cf29d4f Update docs
* improve linking
* parallel construction for storage and servers
* clarify rationale for Task/TaskMut
2021-09-26 13:59:04 -04:00
Dustin J. Mitchell
c62eeb4fcb v0.4.1 2021-09-26 09:26:38 -04:00
Dustin J. Mitchell
a122a28993 Add derive feature for serde
This feature had previously been indirectly required by a dependency,
and this is no longer the case.
2021-09-26 09:07:15 -04:00
Dustin J. Mitchell
fe7d421c21 v0.4.0 2021-09-25 23:42:16 +00:00
dbr
f8ed4cecdd Reset operation auto-increment ID 2021-09-04 13:05:21 +10:00
dbr
5db04ee1af Tidying 2021-09-04 13:05:10 +10:00
dbr
89e9a42374 Refactor calculation of next working set ID
As per Dustin's code-review comment
2021-09-04 13:02:03 +10:00
dbr
1d62799437 Deduplicate StoredUuid wrapper 2021-09-04 12:53:37 +10:00
dbr/Ben
477bf9e328
Tweaks from code review
Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
2021-09-04 12:05:30 +09:30
dbr
75f0447c7b Fix empty-dir problem with server also, and add tests 2021-06-15 22:09:54 +10:00
dbr
e72b990ea2 Avoid error if DB folder does not exist 2021-06-15 20:01:47 +10:00
dbr
2f533d2f3a Merge remote-tracking branch 'origin/main' into sqlstore
# Conflicts:
#	Cargo.lock
#	taskchampion/Cargo.toml
2021-06-15 19:49:36 +10:00
Dustin J. Mitchell
7956f6a34b implement FromStr instead of just from_str 2021-06-05 21:30:28 -04:00
Dustin J. Mitchell
cf3a053a0e Add PENDING, COMPLETED, DELETED synthetic tags
Note that DELETED is not tested since we don't yet support deleting
tasks.
2021-06-05 21:30:27 -04:00
Dustin J. Mitchell
0e60bcedaf hide the implementation of Tag 2021-06-05 21:20:36 -04:00
Dustin J. Mitchell
ff23c9148b refactor taskchampion::task into submodules 2021-06-05 21:20:10 -04:00
Dustin J. Mitchell
3d698f7939 add support for synthetic tags 2021-06-05 20:27:02 -04:00
Dustin J. Mitchell
e977fb294c Implement modifying tasks' "wait" value 2021-05-31 08:49:35 -04:00
Dustin J. Mitchell
d4f669ed6e Define and test an MSRV 2021-05-30 16:07:41 -04:00
dbr
7c665c9a77 Clippy things 2021-05-28 20:41:03 +10:00
dbr
aa2340965e Merge branch 'main' into sqlstore 2021-05-28 12:17:09 +10:00
dbr
baa6b59e39 Remove KvStorage 2021-05-28 12:10:18 +10:00
dbr
f91f797244 Implement storage for local server 2021-05-28 11:38:46 +10:00
dbr
991b29da6c WIP 2021-05-21 15:52:07 +10:00
Dustin J. Mitchell
bb7130f960 Support multiple exit codes
..with more specific error enums.
2021-05-18 18:57:55 +00:00
Dustin J. Mitchell
73b6648d06 assert that working-set element 0 is None 2021-05-16 09:42:18 -04:00
Dustin J. Mitchell
5f6918fbc7 Skip element 0 when rebuilding the working set
The existing code was correct, assuming that element 0 is always None,
but this is clearer.
2021-05-16 09:42:17 -04:00
Dustin J. Mitchell
fa7623ebe7 Handle setting a working set item to None twice
Without this, setting an item to None that did not already exist failed,
because the kv delete operation did not find the referenced key.

This also checks that the index is not 0, which is not allowed as the
working set is 1-indexed.
2021-05-16 09:40:35 -04:00
Dustin J. Mitchell
3a2450cb23 provide context for errors to help debugging 2021-05-16 09:40:35 -04:00
Dustin J. Mitchell
cbe11a1d3d fix new clippy warnings 2021-05-16 09:38:40 -04:00
Dustin J. Mitchell
373cef9d33 [breaking] Include /v1/ in the sync-server paths
This is an incompatible change to the sync-server protocol.
2021-05-14 12:51:24 -04:00
dbr
ff894f6ff6 Comments and rustfmt 2021-04-29 11:01:46 +10:00
dbr
a3c9a76f1d Explicit check that rusqlite::Transaction isn't auto-commited on drop 2021-04-29 10:58:34 +10:00
dbr
23531d73c4 Remove debug junk 2021-04-29 10:57:43 +10:00
dbr
e479c25c34 Tidier 2021-04-29 10:41:17 +10:00
dbr
cefd6fd6cc Serialize Uuid as string for nicer debugging
Also implement ToSql/FromSql for Operation/TaskMap so errors are handled properly
2021-04-29 10:39:29 +10:00
dbr
d5724c4dc2 Unused 2021-04-29 10:37:04 +10:00
dbr
e06e33bee4 Remove kv storage backend
Now uses sqlite by default
2021-04-29 00:20:13 +10:00
dbr
cf70ef49ed Minor tidying 2021-04-29 00:10:53 +10:00
dbr
5ae828b1eb Implement working set methods 2021-04-29 00:09:54 +10:00
dbr
2b7e121e7e Implement operations storage for SQLite 2021-04-28 12:35:50 +10:00
dbr
1959f0c63a Implement all_task_uuids and base version methods 2021-04-27 19:35:45 +10:00
dbr
305e6e2ede Appease clippy 2021-04-22 14:16:07 +10:00
dbr
11d0172bf8 fmt 2021-04-22 14:15:50 +10:00
dbr
a9b93e7c20 Use names for row.get(...) 2021-04-22 13:33:54 +10:00
dbr
4bd6c40daf Use uuid feature of rusqlite 2021-04-22 13:31:15 +10:00
dbr
0f3729d4c8 sqlite: Get all rows
Needs some improvement to error handling
2021-04-22 12:54:34 +10:00
dbr
e40724b381 Start of SQLite backed storage #131 2021-04-22 11:48:05 +10:00
Dustin J. Mitchell
c8d6619d71 Replace tempfile with tempdir 2021-04-16 19:29:27 -04:00