From 6792ea91d292c1b69356e7e9520013410bf0608a Mon Sep 17 00:00:00 2001 From: Elie CHARRA Date: Fri, 9 Dec 2022 17:14:40 +0100 Subject: [PATCH] fix: fix doc for the wherein clause - Missing parenthesis when using WhereIn on multiples columns - Sprintf was not properly closed --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e0184d7c2..358af1c25 100644 --- a/README.md +++ b/README.md @@ -1186,8 +1186,8 @@ Where( ) // WHERE IN clause building -WhereIn("name, age in ?", "John", 24, "Tim", 33) // Generates: WHERE ("name","age") IN (($1,$2),($3,$4)) -WhereIn(fmt.Sprintf("%s, %s in ?", models.PilotColumns.Name, models.PilotColumns.Age, "John", 24, "Tim", 33)) +WhereIn("(name, age) in ?", "John", 24, "Tim", 33) // Generates: WHERE ("name","age") IN (($1,$2),($3,$4)) +WhereIn(fmt.Sprintf("(%s, %s) in ?", models.PilotColumns.Name, models.PilotColumns.Age), "John", 24, "Tim", 33) AndIn("weight in ?", 84) AndIn(models.PilotColumns.Weight + " in ?", 84) OrIn("height in ?", 183, 177, 204)