From 7305f53a28989758fcf3ce04123940ac559c03f1 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Mon, 20 Jun 2022 09:57:27 +0200 Subject: [PATCH] Align table aliases with examples in comments --- store/postgres/src/relational_queries.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/store/postgres/src/relational_queries.rs b/store/postgres/src/relational_queries.rs index 280eeb086ec..23ee8606056 100644 --- a/store/postgres/src/relational_queries.rs +++ b/store/postgres/src/relational_queries.rs @@ -1008,7 +1008,7 @@ impl<'a> QueryFilter<'a> { let parent_column = self.table.primary_key(); if child_column.is_list() { - // Type A: p.id = any(c.{parent_field}) + // Type A: c.id = any(i.{parent_field}) out.push_sql(parent_prefix); out.push_identifier(parent_column.name.as_str())?; out.push_sql(" = any("); @@ -1016,7 +1016,7 @@ impl<'a> QueryFilter<'a> { out.push_identifier(child_column.name.as_str())?; out.push_sql(")"); } else { - // Type B: p.id = c.{parent_field} + // Type B: c.id = i.{parent_field} out.push_sql(parent_prefix); out.push_identifier(parent_column.name.as_str())?; out.push_sql(" = "); @@ -1034,7 +1034,7 @@ impl<'a> QueryFilter<'a> { let child_column = child_table.primary_key(); if parent_column.is_list() { - // Type C: c.id = any(p.child_ids) + // Type C: i.id = any(c.child_ids) out.push_sql(child_prefix); out.push_identifier(child_column.name.as_str())?; out.push_sql(" = any("); @@ -1042,7 +1042,7 @@ impl<'a> QueryFilter<'a> { out.push_identifier(parent_column.name.as_str())?; out.push_sql(")"); } else { - // Type D: c.id = p.child_id + // Type D: i.id = c.child_id out.push_sql(child_prefix); out.push_identifier(child_column.name.as_str())?; out.push_sql(" = ");