Skip to content

Commit

Permalink
use AnyKind instead of AnyPool where possible
Browse files Browse the repository at this point in the history
doing this is useful to help to distinguish those functions that
actually require database access and those that don't
  • Loading branch information
lmcmicu committed Sep 19, 2024
1 parent 9126d61 commit d0002e8
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 148 deletions.
6 changes: 3 additions & 3 deletions src/guess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub fn guess(
.collect::<Vec<_>>()
.join(", ");
local_sql_syntax(
&valve.pool,
&valve.pool.any_kind(),
&format!(
r#"INSERT INTO "table" ("row_number", {column_names}) VALUES
({row_number}, {SQL_PARAM}, {SQL_PARAM}, NULL, NULL)"#,
Expand Down Expand Up @@ -307,7 +307,7 @@ pub fn guess(
.join(", ");

let sql = local_sql_syntax(
&valve.pool,
&valve.pool.any_kind(),
&format!(
r#"INSERT INTO "column" ("row_number", {}) VALUES ({})"#,
column_names, values
Expand Down Expand Up @@ -662,7 +662,7 @@ pub fn annotate(
continue;
}
let sql = local_sql_syntax(
&valve.pool,
&valve.pool.any_kind(),
&format!(
r#"SELECT 1 FROM "{}" WHERE "{}" = {} LIMIT 1"#,
foreign.table, foreign.column, SQL_PARAM
Expand Down
Loading

0 comments on commit d0002e8

Please sign in to comment.