diff options
author | Joan Lledó <jlledom@member.fsf.org> | 2023-09-16 12:55:40 +0200 |
---|---|---|
committer | Joan Lledó <jlledom@member.fsf.org> | 2023-09-30 13:14:49 +0200 |
commit | 5adf507e2a0d17f88ab6bc4541f6f2cb12bde193 (patch) | |
tree | 0931398a72233b754f3d6a4f93cb027c2997f5a2 /src | |
parent | a03368c2c0295c4a4fd64afc1ea684a9bfce80e4 (diff) | |
download | Furtherance-5adf507e2a0d17f88ab6bc4541f6f2cb12bde193.tar.zst |
DB Query: order by name
So the dedup method works properly
Diffstat (limited to 'src')
-rw-r--r-- | src/database.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.rs b/src/database.rs index 4553460..8a7c6c9 100644 --- a/src/database.rs +++ b/src/database.rs @@ -354,7 +354,7 @@ pub fn get_list_by_name(task_name: String) -> Result<Vec<Task>, rusqlite::Error> let mut tasks_vec: Vec<Task> = Vec::new(); let name_param = format!("%{}%", task_name); - let mut query = conn.prepare("SELECT * FROM tasks WHERE lower(task_name) LIKE lower(:task_name)")?; + let mut query = conn.prepare("SELECT * FROM tasks WHERE lower(task_name) LIKE lower(:task_name) ORDER BY task_name")?; let task_iter = query.query_map(&[(":task_name", &name_param)], |row| { Ok(Task { id: row.get(0)?, |