From 0670ac33954ae7719a7eec9f3751fa31b9420fb6 Mon Sep 17 00:00:00 2001 From: Siting Ren Date: Mon, 1 Jul 2024 12:22:12 +0800 Subject: [PATCH] update readme (#177) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f3ee8da..cf61253 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,9 @@ defer rows.Close() ### Performing a query with arguments -This is done in a similar manner on the client side. +**Prerequisites**: Only SQL literals (i.e. query values) should be bound as arguments: they shouldn’t be used to merge table or field names to the query (_vertica-sql-go_ will try quoting the table name as a string value, generating invalid SQL as it is actually a SQL Identifier). If you need to generate dynamically SQL queries (for instance choosing dynamically a table name) you have to construct the full query yourself. + + ```Go rows, err := connDB.QueryContext(ctx, "SELECT name FROM MyTable WHERE id=?", 21)