From d36d561d6c3d0841c312c15c674fef1118ec0402 Mon Sep 17 00:00:00 2001 From: Guy Royse Date: Tue, 2 Nov 2021 15:25:38 -0400 Subject: [PATCH] updates to the where methods for the docs --- docs/README.md | 16 +- docs/classes/Client.md | 8 +- docs/classes/Entity.md | 2 +- docs/classes/RedisError.md | 2 +- docs/classes/Repository.md | 16 +- docs/classes/Schema.md | 10 +- docs/classes/Search.md | 18 +- docs/classes/Where.md | 2 +- docs/classes/WhereField.md | 308 +++++++++++++++++++------------- docs/interfaces/ArrayField.md | 6 +- docs/interfaces/BooleanField.md | 4 +- docs/interfaces/Field.md | 2 +- docs/interfaces/NumericField.md | 4 +- docs/interfaces/StringField.md | 8 +- lib/search/where-field.ts | 134 +++++++++++++- 15 files changed, 355 insertions(+), 185 deletions(-) diff --git a/docs/README.md b/docs/README.md index c5c4d5fa..1e611684 100644 --- a/docs/README.md +++ b/docs/README.md @@ -61,7 +61,7 @@ A constructor that creates an [Entity](classes/Entity.md) of type TEntity. #### Defined in -[lib/entity/entity.ts:10](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/entity/entity.ts#L10) +[lib/entity/entity.ts:10](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/entity/entity.ts#L10) ___ @@ -77,7 +77,7 @@ A JavaScript object containing the underlying data of an [Entity](classes/Entity #### Defined in -[lib/entity/entity.ts:4](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/entity/entity.ts#L4) +[lib/entity/entity.ts:4](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/entity/entity.ts#L4) ___ @@ -89,7 +89,7 @@ Contains instructions telling how to map a property on an [Entity](classes/Entit #### Defined in -[lib/schema/schema-definitions.ts:54](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L54) +[lib/schema/schema-definitions.ts:54](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L54) ___ @@ -109,7 +109,7 @@ A function that generates random [Entity IDs](classes/Entity.md#entityid). #### Defined in -[lib/schema/schema-definitions.ts:68](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L68) +[lib/schema/schema-definitions.ts:68](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L68) ___ @@ -128,7 +128,7 @@ contains a [FieldDefinition](README.md#fielddefinition) that tell Redis OM how t #### Defined in -[lib/schema/schema-definitions.ts:59](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L59) +[lib/schema/schema-definitions.ts:59](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L59) ___ @@ -149,7 +149,7 @@ Configuration options for a [Schema](classes/Schema.md). #### Defined in -[lib/schema/schema-options.ts:7](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-options.ts#L7) +[lib/schema/schema-options.ts:7](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-options.ts#L7) ___ @@ -161,7 +161,7 @@ The type of data structure in Redis to map objects to. #### Defined in -[lib/client.ts:21](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/client.ts#L21) +[lib/client.ts:21](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/client.ts#L21) ___ @@ -193,4 +193,4 @@ A function that takes a [Search](classes/Search.md) and returns a [Search](class #### Defined in -[lib/search/search.ts:21](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L21) +[lib/search/search.ts:21](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L21) diff --git a/docs/classes/Client.md b/docs/classes/Client.md index 6c80b357..0820b5ab 100644 --- a/docs/classes/Client.md +++ b/docs/classes/Client.md @@ -47,7 +47,7 @@ Close the connection to Redis. #### Defined in -[lib/client.ts:79](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/client.ts#L79) +[lib/client.ts:79](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/client.ts#L79) ___ @@ -77,7 +77,7 @@ The raw results of calling the Redis command. #### Defined in -[lib/client.ts:56](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/client.ts#L56) +[lib/client.ts:56](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/client.ts#L56) ___ @@ -107,7 +107,7 @@ A repository for the provided schema. #### Defined in -[lib/client.ts:71](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/client.ts#L71) +[lib/client.ts:71](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/client.ts#L71) ___ @@ -129,4 +129,4 @@ Open a connection to Redis at the provided URL. #### Defined in -[lib/client.ts:43](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/client.ts#L43) +[lib/client.ts:43](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/client.ts#L43) diff --git a/docs/classes/Entity.md b/docs/classes/Entity.md index e4eb910a..ec5dd200 100644 --- a/docs/classes/Entity.md +++ b/docs/classes/Entity.md @@ -25,4 +25,4 @@ The generated entity ID. #### Defined in -[lib/entity/entity.ts:22](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/entity/entity.ts#L22) +[lib/entity/entity.ts:22](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/entity/entity.ts#L22) diff --git a/docs/classes/RedisError.md b/docs/classes/RedisError.md index e05b22d3..621abb51 100644 --- a/docs/classes/RedisError.md +++ b/docs/classes/RedisError.md @@ -44,7 +44,7 @@ Error.constructor #### Defined in -[lib/errors.ts:2](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/errors.ts#L2) +[lib/errors.ts:2](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/errors.ts#L2) ## Properties diff --git a/docs/classes/Repository.md b/docs/classes/Repository.md index de834438..8f2d99b4 100644 --- a/docs/classes/Repository.md +++ b/docs/classes/Repository.md @@ -82,7 +82,7 @@ Constructs a new Repository. #### Defined in -[lib/repository/repository.ts:60](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L60) +[lib/repository/repository.ts:60](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L60) ## Methods @@ -100,7 +100,7 @@ A newly created Entity. #### Defined in -[lib/repository/repository.ts:92](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L92) +[lib/repository/repository.ts:92](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L92) ___ @@ -117,7 +117,7 @@ that RediSearch or RedisJSON is installed on your instance of Redis. #### Defined in -[lib/repository/repository.ts:71](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L71) +[lib/repository/repository.ts:71](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L71) ___ @@ -135,7 +135,7 @@ on your instance of Redis. #### Defined in -[lib/repository/repository.ts:84](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L84) +[lib/repository/repository.ts:84](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L84) ___ @@ -161,7 +161,7 @@ The matching Entity. #### Defined in -[lib/repository/repository.ts:130](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L130) +[lib/repository/repository.ts:130](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L130) ___ @@ -184,7 +184,7 @@ not found, does nothing. #### Defined in -[lib/repository/repository.ts:151](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L151) +[lib/repository/repository.ts:151](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L151) ___ @@ -209,7 +209,7 @@ The ID of the Entity just saved. #### Defined in -[lib/repository/repository.ts:103](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L103) +[lib/repository/repository.ts:103](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L103) ___ @@ -228,4 +228,4 @@ A [Search](Search.md) object. #### Defined in -[lib/repository/repository.ts:162](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/repository/repository.ts#L162) +[lib/repository/repository.ts:162](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/repository/repository.ts#L162) diff --git a/docs/classes/Schema.md b/docs/classes/Schema.md index aeb0ba2a..ebad51e5 100644 --- a/docs/classes/Schema.md +++ b/docs/classes/Schema.md @@ -64,7 +64,7 @@ its constructor. #### Defined in -[lib/schema/schema.ts:53](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema.ts#L53) +[lib/schema/schema.ts:53](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema.ts#L53) ## Accessors @@ -81,7 +81,7 @@ that this Schema uses to store [Entities](Entity.md) in Redis. #### Defined in -[lib/schema/schema.ts:72](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema.ts#L72) +[lib/schema/schema.ts:72](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema.ts#L72) ___ @@ -97,7 +97,7 @@ The configured name for the RediSearch index for this Schema. #### Defined in -[lib/schema/schema.ts:66](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema.ts#L66) +[lib/schema/schema.ts:66](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema.ts#L66) ___ @@ -113,7 +113,7 @@ The configured keyspace prefix in Redis for this Schema. #### Defined in -[lib/schema/schema.ts:63](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema.ts#L63) +[lib/schema/schema.ts:63](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema.ts#L63) ## Methods @@ -129,4 +129,4 @@ Generates a unique string using the configured [IdStrategy](../README.md#idstrat #### Defined in -[lib/schema/schema.ts:81](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema.ts#L81) +[lib/schema/schema.ts:81](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema.ts#L81) diff --git a/docs/classes/Search.md b/docs/classes/Search.md index 0decdad7..d81ffe16 100644 --- a/docs/classes/Search.md +++ b/docs/classes/Search.md @@ -43,7 +43,7 @@ A subclass of [WhereField](WhereField.md) matching the type of the field. #### Defined in -[lib/search/search.ts:124](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L124) +[lib/search/search.ts:124](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L124) ▸ **and**(`subSearchFn`): [`Search`](Search.md)<`TEntity`\> @@ -63,7 +63,7 @@ Sets up a nested search as a logical AND. #### Defined in -[lib/search/search.ts:131](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L131) +[lib/search/search.ts:131](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L131) ___ @@ -79,7 +79,7 @@ Returns the number of [Entities](Entity.md) that match this query. #### Defined in -[lib/search/search.ts:51](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L51) +[lib/search/search.ts:51](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L51) ___ @@ -103,7 +103,7 @@ A subclass of [WhereField](WhereField.md) matching the type of the field. #### Defined in -[lib/search/search.ts:141](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L141) +[lib/search/search.ts:141](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L141) ▸ **or**(`subSearchFn`): [`Search`](Search.md)<`TEntity`\> @@ -123,7 +123,7 @@ Sets up a nested search as a logical OR. #### Defined in -[lib/search/search.ts:148](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L148) +[lib/search/search.ts:148](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L148) ___ @@ -148,7 +148,7 @@ An array of [Entities](Entity.md) matching the query. #### Defined in -[lib/search/search.ts:64](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L64) +[lib/search/search.ts:64](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L64) ___ @@ -180,7 +180,7 @@ An array of [Entities](Entity.md) matching the query. #### Defined in -[lib/search/search.ts:85](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L85) +[lib/search/search.ts:85](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L85) ___ @@ -205,7 +205,7 @@ A subclass of [WhereField](WhereField.md) matching the type of the field. #### Defined in -[lib/search/search.ts:106](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L106) +[lib/search/search.ts:106](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L106) ▸ **where**(`subSearchFn`): [`Search`](Search.md)<`TEntity`\> @@ -226,4 +226,4 @@ they are treated logically as AND. #### Defined in -[lib/search/search.ts:114](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/search.ts#L114) +[lib/search/search.ts:114](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/search.ts#L114) diff --git a/docs/classes/Where.md b/docs/classes/Where.md index da013eb1..36e619d3 100644 --- a/docs/classes/Where.md +++ b/docs/classes/Where.md @@ -40,4 +40,4 @@ Converts this [Where](Where.md) into a portion of a RediSearch query. #### Defined in -[lib/search/where.ts:8](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where.ts#L8) +[lib/search/where.ts:8](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where.ts#L8) diff --git a/docs/classes/WhereField.md b/docs/classes/WhereField.md index ee36bd79..f45e86bb 100644 --- a/docs/classes/WhereField.md +++ b/docs/classes/WhereField.md @@ -35,10 +35,8 @@ subclass of this is returned. - [between](WhereField.md#between) - [contain](WhereField.md#contain) -- [containAllOf](WhereField.md#containallof) - [containOneOf](WhereField.md#containoneof) - [contains](WhereField.md#contains) -- [containsAllOf](WhereField.md#containsallof) - [containsOneOf](WhereField.md#containsoneof) - [eq](WhereField.md#eq) - [equal](WhereField.md#equal) @@ -67,9 +65,14 @@ subclass of this is returned. • `Readonly` **exact**: [`WhereField`](WhereField.md)<`TEntity`\> +Makes a call to [WhereField.match](WhereField.md#match) a [WhereField.matchExact](WhereField.md#matchexact) call. Calling +this multiple times will have no effect. + +**`returns`** this. + #### Defined in -[lib/search/where-field.ts:45](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L45) +[lib/search/where-field.ts:79](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L79) ___ @@ -77,9 +80,14 @@ ___ • `Readonly` **exactly**: [`WhereField`](WhereField.md)<`TEntity`\> +Makes a call to [WhereField.match](WhereField.md#match) a [WhereField.matchExact](WhereField.md#matchexact) call. Calling +this multiple times will have no effect. + +**`returns`** this. + #### Defined in -[lib/search/where-field.ts:46](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L46) +[lib/search/where-field.ts:86](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L86) ## Accessors @@ -97,7 +105,7 @@ this #### Defined in -[lib/search/where-field.ts:107](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L107) +[lib/search/where-field.ts:227](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L227) ___ @@ -115,7 +123,7 @@ this #### Defined in -[lib/search/where-field.ts:99](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L99) +[lib/search/where-field.ts:219](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L219) ___ @@ -134,7 +142,7 @@ this #### Defined in -[lib/search/where-field.ts:116](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L116) +[lib/search/where-field.ts:236](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L236) ## Methods @@ -142,20 +150,24 @@ this ▸ **between**(`lower`, `upper`): [`Search`](Search.md)<`TEntity`\> +Adds an inclusive range comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `lower` | `number` | -| `upper` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `lower` | `number` | The lower bound of the range. | +| `upper` | `number` | The upper bound of the range. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:63](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L63) +[lib/search/where-field.ts:162](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L162) ___ @@ -163,39 +175,23 @@ ___ ▸ **contain**(`value`): [`Search`](Search.md)<`TEntity`\> -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `string` | - -#### Returns - -[`Search`](Search.md)<`TEntity`\> - -#### Defined in - -[lib/search/where-field.ts:65](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L65) - -___ - -### containAllOf - -▸ **containAllOf**(...`value`): [`Search`](Search.md)<`TEntity`\> +Adds a whole-string match for a value within an array to the search query. #### Parameters -| Name | Type | -| :------ | :------ | -| `...value` | `string`[] | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `string` | The string to be matched. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:68](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L68) +[lib/search/where-field.ts:169](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L169) ___ @@ -203,19 +199,24 @@ ___ ▸ **containOneOf**(...`value`): [`Search`](Search.md)<`TEntity`\> +Adds a whole-string match against an array to the query. If any of the provided +strings in `value` is matched in the array, this matched. + #### Parameters -| Name | Type | -| :------ | :------ | -| `...value` | `string`[] | +| Name | Type | Description | +| :------ | :------ | :------ | +| `...value` | `string`[] | An array of strings that you want to match one of. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:71](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L71) +[lib/search/where-field.ts:184](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L184) ___ @@ -223,39 +224,23 @@ ___ ▸ **contains**(`value`): [`Search`](Search.md)<`TEntity`\> -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `string` | - -#### Returns - -[`Search`](Search.md)<`TEntity`\> - -#### Defined in - -[lib/search/where-field.ts:66](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L66) - -___ - -### containsAllOf - -▸ **containsAllOf**(...`value`): [`Search`](Search.md)<`TEntity`\> +Adds a whole-string match for a value within an array to the search query. #### Parameters -| Name | Type | -| :------ | :------ | -| `...value` | `string`[] | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `string` | The string to be matched. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:69](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L69) +[lib/search/where-field.ts:176](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L176) ___ @@ -263,19 +248,24 @@ ___ ▸ **containsOneOf**(...`value`): [`Search`](Search.md)<`TEntity`\> +Adds a whole-string match against an array to the query. If any of the provided +strings in `value` is matched in the array, this matched. + #### Parameters -| Name | Type | -| :------ | :------ | -| `...value` | `string`[] | +| Name | Type | Description | +| :------ | :------ | :------ | +| `...value` | `string`[] | An array of strings that you want to match one of. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:72](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L72) +[lib/search/where-field.ts:192](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L192) ___ @@ -283,7 +273,7 @@ ___ ▸ **eq**(`value`): [`Search`](Search.md)<`TEntity`\> -Adds an equals comparisson to the query. +Adds an equals comparison to the query. #### Parameters @@ -299,7 +289,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:16](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L16) +[lib/search/where-field.ts:16](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L16) ___ @@ -307,7 +297,7 @@ ___ ▸ **equal**(`value`): [`Search`](Search.md)<`TEntity`\> -Adds an equals comparisson to the query. +Adds an equals comparison to the query. #### Parameters @@ -323,7 +313,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:23](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L23) +[lib/search/where-field.ts:23](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L23) ___ @@ -331,7 +321,7 @@ ___ ▸ **equalTo**(`value`): [`Search`](Search.md)<`TEntity`\> -Adds an equals comparisson to the query. +Adds an equals comparison to the query. #### Parameters @@ -347,7 +337,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:37](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L37) +[lib/search/where-field.ts:37](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L37) ___ @@ -355,7 +345,7 @@ ___ ▸ **equals**(`value`): [`Search`](Search.md)<`TEntity`\> -Adds an equals comparisson to the query. +Adds an equals comparison to the query. #### Parameters @@ -371,7 +361,7 @@ The [Search](Search.md) that was called to create this [WhereField](WhereField.m #### Defined in -[lib/search/where-field.ts:30](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L30) +[lib/search/where-field.ts:30](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L30) ___ @@ -379,13 +369,17 @@ ___ ▸ **false**(): [`Search`](Search.md)<`TEntity`\> +Adds a boolean match with a value of `false` to the query. + #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:49](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L49) +[lib/search/where-field.ts:98](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L98) ___ @@ -393,19 +387,23 @@ ___ ▸ **greaterThan**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a greater than comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:52](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L52) +[lib/search/where-field.ts:112](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L112) ___ @@ -413,19 +411,23 @@ ___ ▸ **greaterThanOrEqualTo**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a greater than or equal to comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:55](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L55) +[lib/search/where-field.ts:126](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L126) ___ @@ -433,19 +435,23 @@ ___ ▸ **gt**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a greater than comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:51](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L51) +[lib/search/where-field.ts:105](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L105) ___ @@ -453,19 +459,23 @@ ___ ▸ **gte**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a greater than or equal to comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:54](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L54) +[lib/search/where-field.ts:119](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L119) ___ @@ -473,19 +483,23 @@ ___ ▸ **lessThan**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a less than comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:58](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L58) +[lib/search/where-field.ts:140](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L140) ___ @@ -493,19 +507,23 @@ ___ ▸ **lessThanOrEqualTo**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a less than or equal to comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:61](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L61) +[lib/search/where-field.ts:154](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L154) ___ @@ -513,19 +531,23 @@ ___ ▸ **lt**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a less than comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:57](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L57) +[lib/search/where-field.ts:133](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L133) ___ @@ -533,19 +555,23 @@ ___ ▸ **lte**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a less than or equal to comparison against a field to the search query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `number` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `number` | The number to compare against. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:60](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L60) +[lib/search/where-field.ts:147](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L147) ___ @@ -553,19 +579,23 @@ ___ ▸ **match**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a full-text search comparison to the query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `string` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `string` | The word or phrase sought. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:39](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L39) +[lib/search/where-field.ts:44](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L44) ___ @@ -573,19 +603,23 @@ ___ ▸ **matchExact**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a full-text search comparison to the query that matches an exact word or phrase. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `string` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `string` | The word or phrase sought. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:41](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L41) +[lib/search/where-field.ts:58](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L58) ___ @@ -593,19 +627,23 @@ ___ ▸ **matchExactly**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a full-text search comparison to the query that matches an exact word or phrase. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `string` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `string` | The word or phrase sought. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:42](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L42) +[lib/search/where-field.ts:65](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L65) ___ @@ -613,19 +651,23 @@ ___ ▸ **matches**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a full-text search comparison to the query. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `string` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `string` | The word or phrase sought. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:40](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L40) +[lib/search/where-field.ts:51](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L51) ___ @@ -633,19 +675,23 @@ ___ ▸ **matchesExactly**(`value`): [`Search`](Search.md)<`TEntity`\> +Adds a full-text search comparison to the query that matches an exact word or phrase. + #### Parameters -| Name | Type | -| :------ | :------ | -| `value` | `string` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `string` | The word or phrase sought. | #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:43](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L43) +[lib/search/where-field.ts:72](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L72) ___ @@ -665,7 +711,7 @@ Converts this [Where](Where.md) into a portion of a RediSearch query. #### Defined in -[lib/search/where-field.ts:121](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L121) +[lib/search/where-field.ts:241](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L241) ___ @@ -673,10 +719,14 @@ ___ ▸ **true**(): [`Search`](Search.md)<`TEntity`\> +Adds a boolean match with a value of `true` to the query. + #### Returns [`Search`](Search.md)<`TEntity`\> +The [Search](Search.md) that was called to create this [WhereField](WhereField.md). + #### Defined in -[lib/search/where-field.ts:48](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/search/where-field.ts#L48) +[lib/search/where-field.ts:92](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/search/where-field.ts#L92) diff --git a/docs/interfaces/ArrayField.md b/docs/interfaces/ArrayField.md index 68602757..ac833aea 100644 --- a/docs/interfaces/ArrayField.md +++ b/docs/interfaces/ArrayField.md @@ -33,7 +33,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L7) ___ @@ -48,7 +48,7 @@ here to avoid those problems. Defaults to `|`. #### Defined in -[lib/schema/schema-definitions.ts:50](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L50) +[lib/schema/schema-definitions.ts:50](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L50) ___ @@ -60,4 +60,4 @@ Yep. It's an array. #### Defined in -[lib/schema/schema-definitions.ts:42](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L42) +[lib/schema/schema-definitions.ts:42](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L42) diff --git a/docs/interfaces/BooleanField.md b/docs/interfaces/BooleanField.md index 1792b4cb..9b4117a7 100644 --- a/docs/interfaces/BooleanField.md +++ b/docs/interfaces/BooleanField.md @@ -32,7 +32,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L7) ___ @@ -44,4 +44,4 @@ Yep. It's a boolean. #### Defined in -[lib/schema/schema-definitions.ts:36](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L36) +[lib/schema/schema-definitions.ts:36](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L36) diff --git a/docs/interfaces/Field.md b/docs/interfaces/Field.md index db4b69ff..5cf749cd 100644 --- a/docs/interfaces/Field.md +++ b/docs/interfaces/Field.md @@ -33,4 +33,4 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L7) diff --git a/docs/interfaces/NumericField.md b/docs/interfaces/NumericField.md index 27f9bf4a..75b0158e 100644 --- a/docs/interfaces/NumericField.md +++ b/docs/interfaces/NumericField.md @@ -32,7 +32,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L7) ___ @@ -44,4 +44,4 @@ Yep. It's a number. #### Defined in -[lib/schema/schema-definitions.ts:13](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L13) +[lib/schema/schema-definitions.ts:13](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L13) diff --git a/docs/interfaces/StringField.md b/docs/interfaces/StringField.md index 3daab86c..34baae90 100644 --- a/docs/interfaces/StringField.md +++ b/docs/interfaces/StringField.md @@ -34,7 +34,7 @@ The default field name in Redis is the key name defined in the #### Defined in -[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L7) +[lib/schema/schema-definitions.ts:7](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L7) ___ @@ -49,7 +49,7 @@ here to avoid those problems. Defaults to `|`. #### Defined in -[lib/schema/schema-definitions.ts:30](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L30) +[lib/schema/schema-definitions.ts:30](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L30) ___ @@ -61,7 +61,7 @@ Enables full-text search on this field when set to `true`. Defaults to `false`. #### Defined in -[lib/schema/schema-definitions.ts:22](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L22) +[lib/schema/schema-definitions.ts:22](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L22) ___ @@ -73,4 +73,4 @@ Yep. It's a string. #### Defined in -[lib/schema/schema-definitions.ts:19](https://github.com/redis-developer/redis-om-node/blob/3cf5542/lib/schema/schema-definitions.ts#L19) +[lib/schema/schema-definitions.ts:19](https://github.com/redis-developer/redis-om-node/blob/e0e2e98/lib/schema/schema-definitions.ts#L19) diff --git a/lib/search/where-field.ts b/lib/search/where-field.ts index 5f8d6460..13fcbbe9 100644 --- a/lib/search/where-field.ts +++ b/lib/search/where-field.ts @@ -9,66 +9,186 @@ import Where from "./where"; interface WhereField extends Where { /** - * Adds an equals comparisson to the query. + * Adds an equals comparison to the query. * @param value The value to be compared * @returns The {@link Search} that was called to create this {@link WhereField}. */ eq(value: string | number | boolean): Search; /** - * Adds an equals comparisson to the query. + * Adds an equals comparison to the query. * @param value The value to be compared * @returns The {@link Search} that was called to create this {@link WhereField}. */ equal(value: string | number | boolean): Search; /** - * Adds an equals comparisson to the query. + * Adds an equals comparison to the query. * @param value The value to be compared * @returns The {@link Search} that was called to create this {@link WhereField}. */ equals(value: string | number | boolean): Search; /** - * Adds an equals comparisson to the query. + * Adds an equals comparison to the query. * @param value The value to be compared * @returns The {@link Search} that was called to create this {@link WhereField}. */ equalTo(value: string | number | boolean): Search; + /** + * Adds a full-text search comparison to the query. + * @param value The word or phrase sought. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ match(value: string): Search; + + /** + * Adds a full-text search comparison to the query. + * @param value The word or phrase sought. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ matches(value: string): Search; + + /** + * Adds a full-text search comparison to the query that matches an exact word or phrase. + * @param value The word or phrase sought. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ matchExact(value: string): Search; + + /** + * Adds a full-text search comparison to the query that matches an exact word or phrase. + * @param value The word or phrase sought. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ matchExactly(value: string): Search; + + /** + * Adds a full-text search comparison to the query that matches an exact word or phrase. + * @param value The word or phrase sought. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ matchesExactly(value: string): Search; + /** + * Makes a call to {@link WhereField.match} a {@link WhereField.matchExact} call. Calling + * this multiple times will have no effect. + * @returns this. + */ readonly exact: WhereField; + + /** + * Makes a call to {@link WhereField.match} a {@link WhereField.matchExact} call. Calling + * this multiple times will have no effect. + * @returns this. + */ readonly exactly: WhereField; + /** + * Adds a boolean match with a value of `true` to the query. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ true(): Search; + + /** + * Adds a boolean match with a value of `false` to the query. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ false(): Search; + /** + * Adds a greater than comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ gt(value: number): Search; + + /** + * Adds a greater than comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ greaterThan(value: number): Search; + /** + * Adds a greater than or equal to comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ gte(value: number): Search; + + /** + * Adds a greater than or equal to comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ greaterThanOrEqualTo(value: number): Search; + /** + * Adds a less than comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ lt(value: number): Search; + + /** + * Adds a less than comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ lessThan(value: number): Search; + /** + * Adds a less than or equal to comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ lte(value: number): Search; + + /** + * Adds a less than or equal to comparison against a field to the search query. + * @param value The number to compare against. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ lessThanOrEqualTo(value: number): Search; + /** + * Adds an inclusive range comparison against a field to the search query. + * @param lower The lower bound of the range. + * @param upper The upper bound of the range. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ between(lower: number, upper: number): Search; + /** + * Adds a whole-string match for a value within an array to the search query. + * @param value The string to be matched. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ contain(value: string): Search; - contains(value: string): Search; - containAllOf(...value: string[]): Search; - containsAllOf(...value: string[]): Search; + /** + * Adds a whole-string match for a value within an array to the search query. + * @param value The string to be matched. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ + contains(value: string): Search; + /** + * Adds a whole-string match against an array to the query. If any of the provided + * strings in `value` is matched in the array, this matched. + * @param value An array of strings that you want to match one of. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ containOneOf(...value: string[]): Search; + + /** + * Adds a whole-string match against an array to the query. If any of the provided + * strings in `value` is matched in the array, this matched. + * @param value An array of strings that you want to match one of. + * @returns The {@link Search} that was called to create this {@link WhereField}. + */ containsOneOf(...value: string[]): Search; }