Skip to content

Commit

Permalink
Update src/sql.rs
Browse files Browse the repository at this point in the history
Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com>
  • Loading branch information
link2xt and iequidoo authored Oct 20, 2024
1 parent f48f994 commit cb19f3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ impl Sql {

/// Check if a column exists in a given table.
pub async fn col_exists(&self, table_name: &str, col_name: &str) -> Result<bool> {
self.call(true, move |conn| {
let query_only = true;
self.call(query_only, move |conn| {
let mut exists = false;
// `PRAGMA table_info` returns one row per column,
// each row containing 0=cid, 1=name, 2=type, 3=notnull, 4=dflt_value
Expand Down

0 comments on commit cb19f3f

Please sign in to comment.