/// Search links table for zettels matching `text`
Search links table for zettels matching `text`
Search links table for zettels matching ` text `
pub async fn links(
        conn: &mut SqliteConnection,
        text: &str,
    ) -> Result<Vec<Zettel>, anyhow::Error> {
        Ok(sqlx::query_as::<_, Zettel>("SELECT DISTINCT z.zettel_id, title, timestamp, file_path FROM links l JOIN zettels z ON z.zettel_id = l.zettel_id WHERE link LIKE ?;")
            .bind(format!("%{}%",text))
            .fetch_all( conn).await?)
    }
pub async fn links ( conn : & mut SqliteConnection , text : & str , ) -> Result < Vec < Zettel > , anyhow :: Error > { Ok ( sqlx :: query_as :: < _ , Zettel > ( " " ) . bind ( format ! ( " " text ) ) . fetch_all ( conn ) . await ? ) }
Search links table for zettels matching `text`
Search links table for zettels matching ` text `
conn
&mut SqliteConnection
text
&str