pwdm 0.3.1

Rudimentary command-line tool and Rust library for managing passwords.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
Copyright 2024 Owain Davies
SPDX-License-Identifier: Apache-2.0
*/
use rusqlite::{Connection, Result};

pub fn is_empty(conn: &Connection) -> Result<bool> {
  conn
    .query_row(
      "SELECT exists (SELECT name FROM sqlite_master WHERE type = 'table')",
      [],
      |row| row.get(0),
    )
    .map(|x: u8| x == 0)
}