fn count_key_vertex(db: &rusqlite::Connection) -> Result<usize> {
    let mut stmt = db.prepare("select count (*) from deptable")?;
    let mut rows = stmt.query(rusqlite::NO_PARAMS)?;
    match rows.next()? {
        Some(row) => {
            let cnt: i64 = row.get(0)?;
            Ok(cnt as usize)
        }
        None => Err(Error::Other(
            "Error: Failure getting row count from deptable".to_string(),
        )),
    }
}
/// Count the number of nodes in a depgraph.
Count the number of nodes in a depgraph.
Count the number of nodes in a depgraph .
fn count_key_vertex(db: &rusqlite::Connection) -> Result<usize> {
    let mut stmt = db.prepare("select count (*) from deptable")?;
    let mut rows = stmt.query(rusqlite::NO_PARAMS)?;
    match rows.next()? {
        Some(row) => {
            let cnt: i64 = row.get(0)?;
            Ok(cnt as usize)
        }
        None => Err(Error::Other(
            "Error: Failure getting row count from deptable".to_string(),
        )),
    }
}
fn count_key_vertex ( db : & rusqlite :: Connection ) -> Result < usize > { let mut stmt = db . prepare ( " " ) ? ; let mut rows = stmt . query ( rusqlite :: NO_PARAMS ) ? ; match rows . next ( ) ? { Some ( row ) => { let cnt : i64 = row . get ( 0 ) ? ; Ok ( cnt as usize ) } None => Err ( Error :: Other ( " " . to_string ( ) , ) ) , } }
Count the number of nodes in a depgraph.
Count the number of nodes in a depgraph .
db
&rusqlite::Connection
db
&rusqlite::Connection