You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query_as::<_,Category>("SELECT tc.category_id, tc.name, COUNT(tt.category_id) as num_torrents FROM torrust_categories tc LEFT JOIN torrust_torrents tt on tc.category_id = tt.category_id GROUP BY tc.name")
query_as::<_,CategoryRecord>("SELECT tc.category_id, tc.name, COUNT(tt.category_id) as num_torrents FROM torrust_categories tc LEFT JOIN torrust_torrents tt on tc.category_id = tt.category_id GROUP BY tc.name")
44
44
.fetch_all(&self.pool)
45
45
.await
46
46
.map_err(|_| DatabaseError::Error)
@@ -73,15 +73,13 @@ impl SqliteDatabaseV2_0_0 {
73
73
date_imported:&str,
74
74
administrator:bool,
75
75
) -> Result<i64, sqlx::Error>{
76
-
query(
77
-
"INSERT INTO torrust_users (user_id, date_imported, administrator) VALUES (?, ?, ?)",
78
-
)
79
-
.bind(user_id)
80
-
.bind(date_imported)
81
-
.bind(administrator)
82
-
.execute(&self.pool)
83
-
.await
84
-
.map(|v| v.last_insert_rowid())
76
+
query("INSERT INTO torrust_users (user_id, date_imported, administrator) VALUES (?, ?, ?)")
0 commit comments