Skip to main content

Abstract Class: BaseField

Defined in: schema/fields.ts:29

Base class for all field types

Extended by​

Constructors​

Constructor​

new BaseField(name, type, attrs?): BaseField

Defined in: schema/fields.ts:35

Parameters​

name​

string

type​

string

attrs?​

BaseFieldAttrs = {}

Returns​

BaseField

Methods​

toRedisField()​

abstract toRedisField(isJson): any

Defined in: schema/fields.ts:47

Convert this field to Redis schema field format. Each subclass must implement this method to return the appropriate Redis field type.

Parameters​

isJson​

boolean

Whether the index uses JSON storage (affects field naming with $.prefix)

Returns​

any

Properties​

attrs​

readonly attrs: BaseFieldAttrs

Defined in: schema/fields.ts:32


name​

readonly name: string

Defined in: schema/fields.ts:30


path?​

optional path?: string | null

Defined in: schema/fields.ts:33


type​

readonly type: string

Defined in: schema/fields.ts:31