Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
guyroyse committed Dec 23, 2021
1 parent ca862b2 commit 7cbc29d
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 98 deletions.
34 changes: 14 additions & 20 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ redis-om

### EntityConstructor

Ƭ **EntityConstructor**<`TEntity`\>: (`id`: `string`, `data?`: [`EntityData`](README.md#entitydata)) => `TEntity`
Ƭ **EntityConstructor**<`TEntity`\>: (`schemaDef`: [`SchemaDefinition`](README.md#schemadefinition), `id`: `string`, `data?`: [`EntityData`](README.md#entitydata)) => `TEntity`

#### Type parameters

Expand All @@ -50,20 +50,21 @@ redis-om

#### Type declaration

• (`id`, `data?`)
• (`schemaDef`, `id`, `data?`)

A constructor that creates an [Entity](classes/Entity.md) of type TEntity.

##### Parameters

| Name | Type |
| :------ | :------ |
| `schemaDef` | [`SchemaDefinition`](README.md#schemadefinition) |
| `id` | `string` |
| `data?` | [`EntityData`](README.md#entitydata) |

#### Defined in

[lib/entity/entity.ts:10](https://github.com/redis/redis-om-node/blob/8a196dc/lib/entity/entity.ts#L10)
[lib/entity/entity.ts:12](https://github.com/redis/redis-om-node/blob/ca862b2/lib/entity/entity.ts#L12)

___

Expand All @@ -76,7 +77,7 @@ Initialization data for [Entity](classes/Entity.md) creation when calling

#### Defined in

[lib/repository/repository.ts:14](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L14)
[lib/repository/repository.ts:14](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L14)

___

Expand All @@ -88,7 +89,7 @@ A JavaScript object containing the underlying data of an [Entity](classes/Entity

#### Defined in

[lib/entity/entity.ts:4](https://github.com/redis/redis-om-node/blob/8a196dc/lib/entity/entity.ts#L4)
[lib/entity/entity.ts:6](https://github.com/redis/redis-om-node/blob/ca862b2/lib/entity/entity.ts#L6)

___

Expand All @@ -100,7 +101,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/redis-om-node/blob/8a196dc/lib/schema/schema-definitions.ts#L54)
[lib/schema/schema-definitions.ts:54](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema-definitions.ts#L54)

___

Expand All @@ -120,26 +121,19 @@ A function that generates random [Entity IDs](classes/Entity.md#entityid).

#### Defined in

[lib/schema/schema-definitions.ts:68](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-definitions.ts#L68)
[lib/schema/schema-definitions.ts:62](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema-definitions.ts#L62)

___

### SchemaDefinition

Ƭ **SchemaDefinition**: `Object`
Ƭ **SchemaDefinition**: `Record`<`string`, [`FieldDefinition`](README.md#fielddefinition)\>

Group of [FieldDefinition](README.md#fielddefinition)s that define the schema for an [Entity](classes/Entity.md).

#### Index signature

[key: `string`]: [`FieldDefinition`](README.md#fielddefinition)

The key determines the propery name that is added to the [Entity](classes/Entity.md). The property
contains a [FieldDefinition](README.md#fielddefinition) that tell Redis OM how to map the property to Redis.

#### Defined in

[lib/schema/schema-definitions.ts:59](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-definitions.ts#L59)
[lib/schema/schema-definitions.ts:59](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema-definitions.ts#L59)

___

Expand All @@ -162,7 +156,7 @@ Configuration options for a [Schema](classes/Schema.md).

#### Defined in

[lib/schema/schema-options.ts:7](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-options.ts#L7)
[lib/schema/schema-options.ts:7](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema-options.ts#L7)

___

Expand All @@ -174,7 +168,7 @@ The type of data structure in Redis to map objects to.

#### Defined in

[lib/client.ts:21](https://github.com/redis/redis-om-node/blob/8a196dc/lib/client.ts#L21)
[lib/client.ts:21](https://github.com/redis/redis-om-node/blob/ca862b2/lib/client.ts#L21)

___

Expand All @@ -186,7 +180,7 @@ Valid values for how to use stop words for a given [Schema](classes/Schema.md).

#### Defined in

[lib/schema/schema-definitions.ts:71](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-definitions.ts#L71)
[lib/schema/schema-definitions.ts:65](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema-definitions.ts#L65)

___

Expand Down Expand Up @@ -218,4 +212,4 @@ A function that takes a [Search](classes/Search.md) and returns a [Search](class

#### Defined in

[lib/search/search.ts:22](https://github.com/redis/redis-om-node/blob/8a196dc/lib/search/search.ts#L22)
[lib/search/search.ts:22](https://github.com/redis/redis-om-node/blob/ca862b2/lib/search/search.ts#L22)
8 changes: 4 additions & 4 deletions docs/classes/Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Close the connection to Redis.

#### Defined in

[lib/client.ts:96](https://github.com/redis/redis-om-node/blob/8a196dc/lib/client.ts#L96)
[lib/client.ts:96](https://github.com/redis/redis-om-node/blob/ca862b2/lib/client.ts#L96)

___

Expand Down Expand Up @@ -77,7 +77,7 @@ The raw results of calling the Redis command.

#### Defined in

[lib/client.ts:73](https://github.com/redis/redis-om-node/blob/8a196dc/lib/client.ts#L73)
[lib/client.ts:73](https://github.com/redis/redis-om-node/blob/ca862b2/lib/client.ts#L73)

___

Expand Down Expand Up @@ -107,7 +107,7 @@ A repository for the provided schema.

#### Defined in

[lib/client.ts:88](https://github.com/redis/redis-om-node/blob/8a196dc/lib/client.ts#L88)
[lib/client.ts:88](https://github.com/redis/redis-om-node/blob/ca862b2/lib/client.ts#L88)

___

Expand All @@ -129,4 +129,4 @@ Open a connection to Redis at the provided URL.

#### Defined in

[lib/client.ts:60](https://github.com/redis/redis-om-node/blob/8a196dc/lib/client.ts#L60)
[lib/client.ts:60](https://github.com/redis/redis-om-node/blob/ca862b2/lib/client.ts#L60)
20 changes: 19 additions & 1 deletion docs/classes/Entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ class Foo extends Entity {}

- [entityId](Entity.md#entityid)

### Methods

- [toJSON](Entity.md#tojson)

## Properties

### entityId
Expand All @@ -25,4 +29,18 @@ The generated entity ID.

#### Defined in

[lib/entity/entity.ts:22](https://github.com/redis/redis-om-node/blob/8a196dc/lib/entity/entity.ts#L22)
[lib/entity/entity.ts:27](https://github.com/redis/redis-om-node/blob/ca862b2/lib/entity/entity.ts#L27)

## Methods

### toJSON

**toJSON**(): `Record`<`string`, `any`\>

#### Returns

`Record`<`string`, `any`\>

#### Defined in

[lib/entity/entity.ts:47](https://github.com/redis/redis-om-node/blob/ca862b2/lib/entity/entity.ts#L47)
2 changes: 1 addition & 1 deletion docs/classes/RedisError.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Error.constructor

#### Defined in

[lib/errors.ts:2](https://github.com/redis/redis-om-node/blob/8a196dc/lib/errors.ts#L2)
[lib/errors.ts:2](https://github.com/redis/redis-om-node/blob/ca862b2/lib/errors.ts#L2)

## Properties

Expand Down
18 changes: 9 additions & 9 deletions docs/classes/Repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Constructs a new Repository.

#### Defined in

[lib/repository/repository.ts:66](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L66)
[lib/repository/repository.ts:66](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L66)

## Methods

Expand All @@ -108,7 +108,7 @@ The newly created and saved Entity.

#### Defined in

[lib/repository/repository.ts:156](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L156)
[lib/repository/repository.ts:156](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L156)

___

Expand All @@ -132,7 +132,7 @@ A newly created Entity.

#### Defined in

[lib/repository/repository.ts:113](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L113)
[lib/repository/repository.ts:113](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L113)

___

Expand All @@ -149,7 +149,7 @@ that RediSearch or RedisJSON is installed on your instance of Redis.

#### Defined in

[lib/repository/repository.ts:77](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L77)
[lib/repository/repository.ts:77](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L77)

___

Expand All @@ -167,7 +167,7 @@ on your instance of Redis.

#### Defined in

[lib/repository/repository.ts:96](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L96)
[lib/repository/repository.ts:96](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L96)

___

Expand All @@ -193,7 +193,7 @@ The matching Entity.

#### Defined in

[lib/repository/repository.ts:169](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L169)
[lib/repository/repository.ts:169](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L169)

___

Expand All @@ -216,7 +216,7 @@ not found, does nothing.

#### Defined in

[lib/repository/repository.ts:190](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L190)
[lib/repository/repository.ts:190](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L190)

___

Expand All @@ -241,7 +241,7 @@ The ID of the Entity just saved.

#### Defined in

[lib/repository/repository.ts:130](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L130)
[lib/repository/repository.ts:130](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L130)

___

Expand All @@ -260,4 +260,4 @@ A [Search](Search.md) object.

#### Defined in

[lib/repository/repository.ts:201](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L201)
[lib/repository/repository.ts:201](https://github.com/redis/redis-om-node/blob/ca862b2/lib/repository/repository.ts#L201)
14 changes: 7 additions & 7 deletions docs/classes/Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ its constructor.

#### Defined in

[lib/schema/schema.ts:54](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L54)
[lib/schema/schema.ts:54](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema.ts#L54)

## Accessors

Expand All @@ -83,7 +83,7 @@ that this Schema uses to store [Entities](Entity.md) in Redis.

#### Defined in

[lib/schema/schema.ts:73](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L73)
[lib/schema/schema.ts:73](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema.ts#L73)

___

Expand All @@ -99,7 +99,7 @@ The configured name for the RediSearch index for this Schema.

#### Defined in

[lib/schema/schema.ts:67](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L67)
[lib/schema/schema.ts:67](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema.ts#L67)

___

Expand All @@ -115,7 +115,7 @@ The configured keyspace prefix in Redis for this Schema.

#### Defined in

[lib/schema/schema.ts:64](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L64)
[lib/schema/schema.ts:64](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema.ts#L64)

___

Expand All @@ -132,7 +132,7 @@ than `CUSTOM`.

#### Defined in

[lib/schema/schema.ts:86](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L86)
[lib/schema/schema.ts:86](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema.ts#L86)

___

Expand All @@ -150,7 +150,7 @@ for more details.

#### Defined in

[lib/schema/schema.ts:80](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L80)
[lib/schema/schema.ts:80](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema.ts#L80)

## Methods

Expand All @@ -166,4 +166,4 @@ Generates a unique string using the configured [IdStrategy](../README.md#idstrat

#### Defined in

[lib/schema/schema.ts:95](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L95)
[lib/schema/schema.ts:95](https://github.com/redis/redis-om-node/blob/ca862b2/lib/schema/schema.ts#L95)
Loading

0 comments on commit 7cbc29d

Please sign in to comment.