1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! SQLite persistence layer: one module per entity, migrations on open.
//!
//! ```rust,no_run
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! use kasl::db::{db::Db, tasks::Tasks, workdays::Workdays};
//! use kasl::libs::task::Task;
//!
//! let db = Db::new()?;
//! let mut tasks = Tasks::new()?;
//! let task = Task::new("Review code", "Check PR #123", Some(75));
//! tasks.insert(&task)?;
//! # Ok(())
//! # }
//! ```
//!
//! ```rust,no_run
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! use kasl::db::{tags::{Tags, Tag}, templates::{Templates, TaskTemplate}};
//!
//! let mut tags = Tags::new()?;
//! let tag_id = tags.create(&Tag::new("urgent".to_string(), Some("red".to_string())))?;
//!
//! let mut templates = Templates::new()?;
//! let template = TaskTemplate::new(
//! "daily-standup".to_string(),
//! "Attend daily standup meeting".to_string(),
//! "Team sync and planning".to_string(),
//! 100
//! );
//! templates.create(&template)?;
//! # Ok(())
//! # }
//! ```
/// Connection handling and schema bootstrap.
// kasl::db::db::Db is the established public path
/// Versioned schema migrations.
/// Local inbox of assigned open Jira issues.
/// Catalog of Jira status id → name pairs synced from issues.
/// Pause records detected by the monitor or entered by hand.
/// Tags and their task associations.
/// Task CRUD and filtered queries.
/// Days owed to kasl-server after a failed or skipped upload.
/// Reusable task templates.
/// Workday start/end records.