Skip to main content

wrapLikeFragment()

wrapLikeFragment(fragment: string, operatorLC: string, __namedParameters?: { concatOperator?: string; quoteValuesWith?: string; wrapValueWith?: [string, string]; }): string

Defined in: packages/core/src/utils/formatQuery/utils.ts:98

Wraps an already-serialized SQL fragment (a quoted field name or an expression) with the LIKE wildcards for the given (lowercase) string-match operator, concatenating the literal % markers via the preset-aware getSQLConcat. Returns the fragment untouched for operators without wildcards.

Parameters

ParameterType
fragmentstring
operatorLCstring
__namedParameters{ concatOperator?: string; quoteValuesWith?: string; wrapValueWith?: [string, string]; }
__namedParameters.concatOperator?string
__namedParameters.quoteValuesWith?string
__namedParameters.wrapValueWith?[string, string]

Returns

string


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.