From fef0fe731c053815b178d3fabac4b61914858c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Calder=C3=B3n?= Date: Thu, 26 Dec 2024 18:28:40 -0300 Subject: [PATCH] Fix SQL parameter style for SQLite The query uses PostgreSQL-style positional parameters ($1, $2) while the codebase uses SQLite. This will cause runtime errors as SQLite expects ?1, ?2 style parameters. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index 9dafd11f..ad7ca86d 100644 --- a/src/db.rs +++ b/src/db.rs @@ -334,7 +334,7 @@ pub async fn add_new_user(pool: &SqlitePool, new_user: User) -> anyhow::Result<( let result = sqlx::query( " INSERT INTO users (pubkey, is_admin, is_solver, is_banned, category, last_trade_index, total_reviews, total_rating, last_rating, max_rating, min_rating, created_at) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) + VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12) ", ) .bind(new_user.pubkey)