FullTextType
Hierarchy
- Type<string | WeightedFullTextValue, string | null | RawQueryFragment>
- FullTextType
Index
Constructors
constructor
Parameters
regconfig: string = 'simple'
Returns FullTextType
Properties
optionalmeta
optionalplatform
optionalprop
publicregconfig
Accessors
name
Returns string
runtimeType
Returns string
Methods
compareAsType
Returns string
optionalcompareValues
Allows to override the internal comparison logic.
Parameters
a: null | string | RawQueryFragment
b: null | string | RawQueryFragment
Returns boolean
convertToDatabaseValue
Converts a value from its JS representation to its database representation of this type.
Parameters
value: string | WeightedFullTextValue
platform: PostgreSqlPlatform
optionalcontext: boolean | TransformContext
Returns null | string | RawQueryFragment
optionalconvertToDatabaseValueSQL
Converts a value from its JS representation to its database representation of this type.
Parameters
key: string
platform: Platform
Returns string
convertToJSValue
Converts a value from its database representation to its JS representation of this type.
Parameters
value: null | string | RawQueryFragment
platform: Platform
Returns string | WeightedFullTextValue
optionalconvertToJSValueSQL
Modifies the SQL expression (identifier, parameter) to convert to a JS value.
Parameters
key: string
platform: Platform
Returns string
ensureComparable
When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the
convertToDatabaseValue
result. This allows to disable the additional conversion in case you know it is not needed.Type parameters
- T: object
Parameters
meta: EntityMetadata<T>
prop: EntityProperty<T, any>
Returns boolean
getColumnType
Gets the SQL declaration snippet for a field of this type.
Returns string
toJSON
Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value.
Parameters
value: string | WeightedFullTextValue
platform: Platform
Returns null | string | RawQueryFragment | WeightedFullTextValue
staticgetType
Type parameters
- JSType
- DBType = JSType
Parameters
cls: Constructor<Type<JSType, DBType>>
Returns Type<JSType, DBType>
staticisMappedType
Checks whether the argument is instance of
Type
.Parameters
data: any
Returns data is Type<any, any>
How should the raw database values be compared? Used in
EntityComparator
. Possible values: string | number | bigint | boolean | date | any | buffer | array