Skip to content

Commit

Permalink
swapped out EntityData for EntityCreationData because null
Browse files Browse the repository at this point in the history
  • Loading branch information
guyroyse committed Dec 23, 2021
1 parent 8a196dc commit b4778d1
Show file tree
Hide file tree
Showing 16 changed files with 113 additions and 93 deletions.
32 changes: 23 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ redis-om
### Type aliases

- [EntityConstructor](README.md#entityconstructor)
- [EntityCreationData](README.md#entitycreationdata)
- [EntityData](README.md#entitydata)
- [FieldDefinition](README.md#fielddefinition)
- [IdStrategy](README.md#idstrategy)
Expand Down Expand Up @@ -62,7 +63,20 @@ A constructor that creates an [Entity](classes/Entity.md) of type TEntity.

#### Defined in

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

___

### EntityCreationData

Ƭ **EntityCreationData**: `Record`<`string`, `number` \| `boolean` \| `string` \| `string`[] \| ``null``\>

Initialization data for [Entity](classes/Entity.md) creation when calling
[Repository.createEntity](classes/Repository.md#createentity) or [Repository.createAndSave](classes/Repository.md#createandsave).

#### Defined in

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

___

Expand All @@ -74,7 +88,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/80a8574/lib/entity/entity.ts#L4)
[lib/entity/entity.ts:4](https://github.com/redis/redis-om-node/blob/8a196dc/lib/entity/entity.ts#L4)

___

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

___

Expand All @@ -106,7 +120,7 @@ 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/80a8574/lib/schema/schema-definitions.ts#L68)
[lib/schema/schema-definitions.ts:68](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-definitions.ts#L68)

___

Expand All @@ -125,7 +139,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/redis-om-node/blob/80a8574/lib/schema/schema-definitions.ts#L59)
[lib/schema/schema-definitions.ts:59](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-definitions.ts#L59)

___

Expand All @@ -148,7 +162,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/80a8574/lib/schema/schema-options.ts#L7)
[lib/schema/schema-options.ts:7](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-options.ts#L7)

___

Expand All @@ -160,7 +174,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/80a8574/lib/client.ts#L21)
[lib/client.ts:21](https://github.com/redis/redis-om-node/blob/8a196dc/lib/client.ts#L21)

___

Expand All @@ -172,7 +186,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/80a8574/lib/schema/schema-definitions.ts#L71)
[lib/schema/schema-definitions.ts:71](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema-definitions.ts#L71)

___

Expand Down Expand Up @@ -204,4 +218,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/80a8574/lib/search/search.ts#L22)
[lib/search/search.ts:22](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/client.ts#L96)
[lib/client.ts:96](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/client.ts#L73)
[lib/client.ts:73](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/client.ts#L88)
[lib/client.ts:88](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/client.ts#L60)
[lib/client.ts:60](https://github.com/redis/redis-om-node/blob/8a196dc/lib/client.ts#L60)
2 changes: 1 addition & 1 deletion docs/classes/Entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ The generated entity ID.

#### Defined in

[lib/entity/entity.ts:22](https://github.com/redis/redis-om-node/blob/80a8574/lib/entity/entity.ts#L22)
[lib/entity/entity.ts:22](https://github.com/redis/redis-om-node/blob/8a196dc/lib/entity/entity.ts#L22)
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/80a8574/lib/errors.ts#L2)
[lib/errors.ts:2](https://github.com/redis/redis-om-node/blob/8a196dc/lib/errors.ts#L2)

## Properties

Expand Down
22 changes: 11 additions & 11 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:60](https://github.com/redis/redis-om-node/blob/80a8574/lib/repository/repository.ts#L60)
[lib/repository/repository.ts:66](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L66)

## Methods

Expand All @@ -98,7 +98,7 @@ Creates and saves an [Entity](Entity.md). Equivalent of calling

| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | [`EntityData`](../README.md#entitydata) | Optional values with which to initialize the entity. |
| `data` | [`EntityCreationData`](../README.md#entitycreationdata) | Optional values with which to initialize the entity. |

#### Returns

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

#### Defined in

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

___

Expand All @@ -122,7 +122,7 @@ Creates an [Entity](Entity.md) with a populated [Entity.entityId](Entity.md#enti

| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | [`EntityData`](../README.md#entitydata) | Optional values with which to initialize the entity. |
| `data` | [`EntityCreationData`](../README.md#entitycreationdata) | Optional values with which to initialize the entity. |

#### Returns

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

#### Defined in

[lib/repository/repository.ts:107](https://github.com/redis/redis-om-node/blob/80a8574/lib/repository/repository.ts#L107)
[lib/repository/repository.ts:113](https://github.com/redis/redis-om-node/blob/8a196dc/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:71](https://github.com/redis/redis-om-node/blob/80a8574/lib/repository/repository.ts#L71)
[lib/repository/repository.ts:77](https://github.com/redis/redis-om-node/blob/8a196dc/lib/repository/repository.ts#L77)

___

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

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

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

___

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

#### Defined in

[lib/repository/repository.ts:195](https://github.com/redis/redis-om-node/blob/80a8574/lib/repository/repository.ts#L195)
[lib/repository/repository.ts:201](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/schema/schema.ts#L54)
[lib/schema/schema.ts:54](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/schema/schema.ts#L73)
[lib/schema/schema.ts:73](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/schema/schema.ts#L67)
[lib/schema/schema.ts:67](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/schema/schema.ts#L64)
[lib/schema/schema.ts:64](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/schema/schema.ts#L86)
[lib/schema/schema.ts:86](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/schema/schema.ts#L80)
[lib/schema/schema.ts:80](https://github.com/redis/redis-om-node/blob/8a196dc/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/80a8574/lib/schema/schema.ts#L95)
[lib/schema/schema.ts:95](https://github.com/redis/redis-om-node/blob/8a196dc/lib/schema/schema.ts#L95)
Loading

0 comments on commit b4778d1

Please sign in to comment.