redis-om
- BaseFieldDefinition
- BooleanFieldDefinition
- DateFieldDefinition
- NumberFieldDefinition
- PointFieldDefinition
- SeparableFieldDefinition
- SortableFieldDefinition
- StringArrayFieldDefinition
- StringFieldDefinition
- TextFieldDefinition
- CircleFunction
- DataStructure
- EntityConstructor
- EntityData
- EntityValue
- FieldDefinition
- IdStrategy
- Point
- SchemaDefinition
- SchemaFieldType
- SchemaOptions
- SearchDataStructure
- StopWordOptions
- SubSearchFunction
Ƭ CircleFunction: (circle
: Circle
) => Circle
▸ (circle
): Circle
A function that defines a circle for .inCircle
searches.
Name | Type |
---|---|
circle |
Circle |
Ƭ DataStructure: "HASH"
| "JSON"
The type of data structure in Redis to map objects to.
lib/schema/options/data-structure.ts:2
Ƭ EntityConstructor<TEntity
>: (schema
: Schema
<any
>, id
: string
, data?
: EntityData
) => TEntity
Name | Description |
---|---|
TEntity |
The Entity type. |
• (schema
, id
, data?
)
A constructor that creates an Entity of type TEntity.
Name | Type |
---|---|
schema |
Schema <any > |
id |
string |
data? |
EntityData |
lib/entity/entity-constructor.ts:8
Ƭ EntityData: Record
<string
, EntityValue
>
A JavaScript object containing the underlying data of an Entity.
Ƭ EntityValue: string
| number
| boolean
| Point
| Date
| any
[] | null
Valid types for properties on an Entity.
Ƭ FieldDefinition: StringFieldDefinition
| TextFieldDefinition
| NumberFieldDefinition
| BooleanFieldDefinition
| PointFieldDefinition
| DateFieldDefinition
| StringArrayFieldDefinition
Contains instructions telling how to map a property on an Entity to Redis.
lib/schema/definition/field-definition.ts:10
Ƭ IdStrategy: () => string
▸ (): string
A function that generates random Entity IDs.
string
lib/schema/options/id-strategy.ts:2
Ƭ Point: Object
Defines a point on the globe using longitude and latitude.
Name | Type | Description |
---|---|---|
latitude |
number |
The latitude of the point. |
longitude |
number |
The longitude of the point. |
Ƭ SchemaDefinition: Record
<string
, FieldDefinition
>
Group of FieldDefinitions that define the schema for an Entity.
lib/schema/definition/schema-definition.ts:6
Ƭ SchemaFieldType: "string"
| "number"
| "boolean"
| "text"
| "date"
| "point"
| "string[]"
Valid types a FieldDefinition.
lib/schema/definition/schema-field-type.ts:4
Ƭ SchemaOptions: Object
Configuration options for a Schema.
Name | Type | Description |
---|---|---|
dataStructure? |
DataStructure |
The data structure used to store the Entity in Redis. Can be set to either JSON or HASH . Defaults to JSON. |
idStrategy? |
IdStrategy |
A function that generates a random Entity ID. Defaults to a function that generates ULIDs. Combined with prefix to generate a Redis key. If prefix is Foo and idStratgey returns 12345 then the generated key would be Foo:12345 . |
indexHashName? |
string |
The name used by Redis OM to store the hash of the index for this Schema. Defaults to prefix followed by :index:hash . So, for a prefix of Foo , it would use Foo:index:hash . |
indexName? |
string |
The name used by RediSearch to store the index for this Schema. Defaults to prefix followed by :index . So, for a prefix of Foo , it would use Foo:index . |
prefix? |
string |
The string that comes before the ID when creating Redis keys for Entities. Defaults to the class name of the Entity. Combined with the results of idStrategy to generate a key. If prefix is Foo and idStrategy returns 12345 then the generated key would be Foo:12345 . |
stopWords? |
string [] |
Stop words to be used by this schema. If useStopWords is anything other than CUSTOM , this option is ignored. |
useStopWords? |
StopWordOptions |
Configures the usage of stop words. Valid values are OFF , DEFAULT , and CUSTOM . Setting this to OFF disables all stop words. Setting this to DEFAULT uses the stop words intrinsic to RediSearch. Setting this to CUSTOM tells RediSearch to use the stop words in stopWords . |
lib/schema/options/schema-options.ts:9
Ƭ SearchDataStructure: "HASH"
| "JSON"
The type of data structure in Redis to map objects to.
Ƭ StopWordOptions: "OFF"
| "DEFAULT"
| "CUSTOM"
Valid values for how to use stop words for a given Schema.
lib/schema/options/stop-word-options.ts:2
Ƭ SubSearchFunction<TEntity
>: (search
: Search
<TEntity
>) => Search
<TEntity
>
Name | Type | Description |
---|---|---|
TEntity |
extends Entity |
The type of Entity being sought. |
▸ (search
): Search
<TEntity
>
A function that takes a Search and returns a Search. Used in nested queries.
Name | Type |
---|---|
search |
Search <TEntity > |
Search
<TEntity
>