From c0be97115c491228e4d4f0699004f79ce2bb19e1 Mon Sep 17 00:00:00 2001 From: jude Date: Tue, 20 Oct 2020 00:31:56 +0100 Subject: [PATCH] be explicit with columns in some sql queries --- src/commands/todo_cmds.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/todo_cmds.rs b/src/commands/todo_cmds.rs index b0847b2..a24eada 100644 --- a/src/commands/todo_cmds.rs +++ b/src/commands/todo_cmds.rs @@ -82,7 +82,7 @@ impl TodoTarget { sqlx::query_as!( Todo, " -SELECT * FROM todos WHERE channel_id = (SELECT id FROM channels WHERE channel = ?) +SELECT id, user_id, guild_id, channel_id, value FROM todos WHERE channel_id = (SELECT id FROM channels WHERE channel = ?) ", cid.as_u64() ) @@ -92,7 +92,7 @@ SELECT * FROM todos WHERE channel_id = (SELECT id FROM channels WHERE channel = sqlx::query_as!( Todo, " -SELECT * FROM todos WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?) AND channel_id IS NULL +SELECT id, user_id, guild_id, channel_id, value FROM todos WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?) AND channel_id IS NULL ", gid.as_u64() ) @@ -102,7 +102,7 @@ SELECT * FROM todos WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?) AND sqlx::query_as!( Todo, " -SELECT * FROM todos WHERE user_id = (SELECT id FROM users WHERE user = ?) AND guild_id IS NULL +SELECT id, user_id, guild_id, channel_id, value FROM todos WHERE user_id = (SELECT id FROM users WHERE user = ?) AND guild_id IS NULL ", self.user.as_u64() )