From 16e3218de6d17eb04335dd7726873bdb2b4ae0e5 Mon Sep 17 00:00:00 2001 From: Joe Averbukh <joeaverbukh@gmail.com> Date: Tue, 26 Nov 2024 13:48:06 -0800 Subject: [PATCH 1/6] [Docs] Update docs with checked type --- client/www/pages/docs/instaql.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/www/pages/docs/instaql.md b/client/www/pages/docs/instaql.md index 5f7b713f7..e7b95663a 100644 --- a/client/www/pages/docs/instaql.md +++ b/client/www/pages/docs/instaql.md @@ -870,9 +870,10 @@ console.log(data) ### $like -The `where` clause supports `$like` queries that will return entities that match -a case-insensitive substring of the provided value for the field. You can use -`$like` to do queries like `contains`, `startsWith`, and `endsWith`. +The `where` clause supports `$like` on fields that are indexed with a checked `string` type. + +`$like` queries will return entities that match a case-insensitive substring of the provided value for the field. +You can use `$like` to do queries like `contains`, `startsWith`, and `endsWith`. `{ $like: "%promoted!" }` looks for values that end with "promoted!". From 63577e628cdee4c437f7b3d5eb4ac54e9faa421d Mon Sep 17 00:00:00 2001 From: Joe Averbukh <joeaverbukh@gmail.com> Date: Tue, 26 Nov 2024 13:59:08 -0800 Subject: [PATCH 2/6] sm --- client/www/pages/docs/instaql.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/www/pages/docs/instaql.md b/client/www/pages/docs/instaql.md index e7b95663a..0aa145a7b 100644 --- a/client/www/pages/docs/instaql.md +++ b/client/www/pages/docs/instaql.md @@ -872,8 +872,14 @@ console.log(data) The `where` clause supports `$like` on fields that are indexed with a checked `string` type. -`$like` queries will return entities that match a case-insensitive substring of the provided value for the field. -You can use `$like` to do queries like `contains`, `startsWith`, and `endsWith`. +`$like` queries will return entities that match a case-insensitive substring of the provided value for the field. Here's how you can do queries like `startsWith`, `endsWith` and `includes`. + +| Example | Description | JS equivalent | +| :-----------------------: | :------------------: | :-----------: | +| `{ $like: "Get%" }` | Starts with 'Get' | `startsWith` | +| `{ $like: "%promoted!" }` | Ends with 'promoted' | `endsWith` | +| `{ $like: "%fit%" }` | Contains 'fit' | `includes` | + `{ $like: "%promoted!" }` looks for values that end with "promoted!". From 0427c8d01f08f07185d5249b1afc856166841ac4 Mon Sep 17 00:00:00 2001 From: Joe Averbukh <joeaverbukh@gmail.com> Date: Tue, 26 Nov 2024 14:01:11 -0800 Subject: [PATCH 3/6] sm --- client/www/pages/docs/instaql.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/client/www/pages/docs/instaql.md b/client/www/pages/docs/instaql.md index 0aa145a7b..986538e7e 100644 --- a/client/www/pages/docs/instaql.md +++ b/client/www/pages/docs/instaql.md @@ -881,12 +881,8 @@ The `where` clause supports `$like` on fields that are indexed with a checked `s | `{ $like: "%fit%" }` | Contains 'fit' | `includes` | -`{ $like: "%promoted!" }` looks for values that end with "promoted!". - -`{ $like: "Get%" }` looks for values that start with "Get". - -`{ $like: "%fit%" }` looks for values that contain "fit". - +Here's how you can use `$like` to find all goals that end with the word +"promoted!" ```javascript // Find all goals that end with the word "promoted!" From e9a9c637cb8ba625b8c778a9ccb62bef97a86864 Mon Sep 17 00:00:00 2001 From: Joe Averbukh <joeaverbukh@gmail.com> Date: Tue, 26 Nov 2024 14:01:54 -0800 Subject: [PATCH 4/6] sm --- client/www/pages/docs/instaql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/www/pages/docs/instaql.md b/client/www/pages/docs/instaql.md index 986538e7e..f0a271e20 100644 --- a/client/www/pages/docs/instaql.md +++ b/client/www/pages/docs/instaql.md @@ -664,7 +664,7 @@ console.log(data) The `where` clause supports comparison operators on fields that are indexed and have checked types. {% callout %} -Add indexes and checked types to your attributes from the [Explorer on the the Instant dashboard](/dash?t=explorer) or from the [cli with Schema-as-code](/docs/schema). +Add indexes and checked types to your attributes from the [Explorer on the Instant dashboard](/dash?t=explorer) or from the [cli with Schema-as-code](/docs/schema). {% /callout %} | Operator | Description | JS equivalent | From b49ece32ea8835b3779b0ed71ca0209aa4811a74 Mon Sep 17 00:00:00 2001 From: Joe Averbukh <joeaverbukh@gmail.com> Date: Tue, 26 Nov 2024 14:04:56 -0800 Subject: [PATCH 5/6] sm --- client/www/pages/docs/instaql.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/www/pages/docs/instaql.md b/client/www/pages/docs/instaql.md index f0a271e20..80fd201b2 100644 --- a/client/www/pages/docs/instaql.md +++ b/client/www/pages/docs/instaql.md @@ -874,11 +874,11 @@ The `where` clause supports `$like` on fields that are indexed with a checked `s `$like` queries will return entities that match a case-insensitive substring of the provided value for the field. Here's how you can do queries like `startsWith`, `endsWith` and `includes`. -| Example | Description | JS equivalent | -| :-----------------------: | :------------------: | :-----------: | -| `{ $like: "Get%" }` | Starts with 'Get' | `startsWith` | -| `{ $like: "%promoted!" }` | Ends with 'promoted' | `endsWith` | -| `{ $like: "%fit%" }` | Contains 'fit' | `includes` | +| Example | Description | JS equivalent | +| :-----------------------: | :-------------------: | :-----------: | +| `{ $like: "Get%" }` | Starts with 'Get' | `startsWith` | +| `{ $like: "%promoted!" }` | Ends with 'promoted!' | `endsWith` | +| `{ $like: "%fit%" }` | Contains 'fit' | `includes` | Here's how you can use `$like` to find all goals that end with the word From d330b1336bcb669ec82c22a81f3d9cbb9761d6a6 Mon Sep 17 00:00:00 2001 From: Joe Averbukh <joeaverbukh@gmail.com> Date: Tue, 26 Nov 2024 14:14:18 -0800 Subject: [PATCH 6/6] cr --- client/www/pages/docs/instaql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/www/pages/docs/instaql.md b/client/www/pages/docs/instaql.md index 80fd201b2..d242798bf 100644 --- a/client/www/pages/docs/instaql.md +++ b/client/www/pages/docs/instaql.md @@ -872,7 +872,7 @@ console.log(data) The `where` clause supports `$like` on fields that are indexed with a checked `string` type. -`$like` queries will return entities that match a case-insensitive substring of the provided value for the field. Here's how you can do queries like `startsWith`, `endsWith` and `includes`. +`$like` queries will return entities that match a **case sensitive** substring of the provided value for the field. Here's how you can do queries like `startsWith`, `endsWith` and `includes`. | Example | Description | JS equivalent | | :-----------------------: | :-------------------: | :-----------: |