From 5af867d4e06203579cf1596d7bf20eb584c1427b Mon Sep 17 00:00:00 2001 From: gneeri Date: Thu, 14 Mar 2024 11:43:42 -0400 Subject: [PATCH] added parameter quoting for native queries in Snowflake PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10716 GitOrigin-RevId: 87c61866c5bff10439e2b82e29cd9e3df2f337e0 --- docs/docs/schema/snowflake/native-queries.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs/schema/snowflake/native-queries.mdx b/docs/docs/schema/snowflake/native-queries.mdx index a91d834b148..229c6cfc639 100644 --- a/docs/docs/schema/snowflake/native-queries.mdx +++ b/docs/docs/schema/snowflake/native-queries.mdx @@ -497,6 +497,14 @@ use an argument to specify the name of the table in a `FROM` clause. When making a query, the arguments are specified using the `args` parameter of the query root field. +##### Example: `LIKE` operator + +A commonly used operator is the `LIKE`. When used in a `WHERE` condition, it's usually written with this syntax +`WHERE Title LIKE '%word%'`. + +In order to use it with Native Query arguments, you need to use this syntax `LIKE ('%' || {{searchTitle}} || '%')`, +where `searchTitle` is the Native Query parameter. + ## Query functionality Just like tables, Native Queries generate GraphQL types with the ability to further break down the data. You can find