Skip to main content

ParseSQLOptions

Defined in: packages/core/src/utils/parseSQL/parseSQL.ts:103

Options object for parseSQL.

Extends

  • ParserCommonOptions

Properties

bigIntOnOverflow?

optional bigIntOnOverflow?: boolean

Defined in: packages/core/src/types/import.ts:23

Generates a bigint value if the string represents a valid integer outside the safe boundaries of the number type.

Inherited from

ParserCommonOptions.bigIntOnOverflow


fields?

optional fields?: OptionList<{[key: string]: unknown; className?: Classname | undefined; comparator?: string | ((f: {[key: string]: unknown; className?: Classname | undefined; comparator?: string | ((f: { [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (string...; defaultOperator?: string; defaultValue?: any; disabled?: boolean; id?: string; inputType?: InputType | null | undefined; label: string; matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[]; name: string; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<string>[] | (string | FlexibleOption<...>)[] | undefined; placeholder?: string; subproperties?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (s...; validator?: RuleValidator; value: string; valueEditorType?: ValueEditorType | ((operator: string) => ValueEditorType) | undefined; values?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | undefined; valueSources?: ValueSources | [FlexibleOption, ...FlexibleOption[]] | ((operator: string) => ValueSources | [FlexibleOption, ...FlexibleOption[]]); }, operator: string) => boolean); defaultOperator?: string; defaultValue?: any; disabled?: boolean; id?: string; inputType?: InputType | null | undefined; label: string; matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[]; name: string; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<string>[] | (string | FlexibleOption<...>)[] | undefined; placeholder?: string; subproperties?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (s...; validator?: RuleValidator; value: string; valueEditorType?: ValueEditorType | ((operator: string) => ValueEditorType) | undefined; values?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | undefined; valueSources?: ValueSources | [FlexibleOption, ...FlexibleOption[]] | ((operator: string) => ValueSources | [FlexibleOption, ...FlexibleOption[]]); }> | Record<string, {[key: string]: unknown; className?: Classname | undefined; comparator?: string | ((f: {[key: string]: unknown; className?: Classname | undefined; comparator?: string | ((f: { [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (string...; defaultOperator?: string; defaultValue?: any; disabled?: boolean; id?: string; inputType?: InputType | null | undefined; label: string; matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[]; name: string; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<string>[] | (string | FlexibleOption<...>)[] | undefined; placeholder?: string; subproperties?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (s...; validator?: RuleValidator; value: string; valueEditorType?: ValueEditorType | ((operator: string) => ValueEditorType) | undefined; values?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | undefined; valueSources?: ValueSources | [FlexibleOption, ...FlexibleOption[]] | ((operator: string) => ValueSources | [FlexibleOption, ...FlexibleOption[]]); }, operator: string) => boolean); defaultOperator?: string; defaultValue?: any; disabled?: boolean; id?: string; inputType?: InputType | null | undefined; label: string; matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[]; name: string; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<string>[] | (string | FlexibleOption<...>)[] | undefined; placeholder?: string; subproperties?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; id?: string | undefined; operators?: string[] | FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | FlexibleOption<...>[] | (s...; validator?: RuleValidator; value: string; valueEditorType?: ValueEditorType | ((operator: string) => ValueEditorType) | undefined; values?: FlexibleOptionList<{ [x: string]: unknown; label: string; disabled?: boolean | undefined; name: string; value: string; }> | undefined; valueSources?: ValueSources | [FlexibleOption, ...FlexibleOption[]] | ((operator: string) => ValueSources | [FlexibleOption, ...FlexibleOption[]]); }>

Defined in: packages/core/src/types/import.ts:8

Inherited from

ParserCommonOptions.fields


generateIDs?

optional generateIDs?: boolean

Defined in: packages/core/src/types/import.ts:18

When true, a unique id will be generated for each rule and group in the query.

Inherited from

ParserCommonOptions.generateIDs


getExpression?

optional getExpression?: (node: SQLExpressionOperand, ctx: ParseSQLExpressionContext) => ExpressionNode | null

Defined in: packages/core/src/utils/parseSQL/parseSQL.ts:114

Handler that converts a non-identifier/non-literal SQL operand subtree (arithmetic BitExpression / FunctionCall / parenthesized) into an ExpressionNode. Return null to reject (the rule is dropped). Supplied by @react-querybuilder/expr (expressionParserSQL). When omitted, expression operands are ignored (current behavior — rule dropped).

Parameters

ParameterType
nodeSQLExpressionOperand
ctxParseSQLExpressionContext

Returns

ExpressionNode | null


getValueSources?

optional getValueSources?: (field: string, operator: string) => ValueSources

Defined in: packages/core/src/types/import.ts:9

Parameters

ParameterType
fieldstring
operatorstring

Returns

ValueSources

Inherited from

ParserCommonOptions.getValueSources


independentCombinators?

optional independentCombinators?: boolean

Defined in: packages/core/src/types/import.ts:14

When true, the generated query will use independent combinators (RuleGroupTypeIC).

Inherited from

ParserCommonOptions.independentCombinators


listsAsArrays?

optional listsAsArrays?: boolean

Defined in: packages/core/src/types/import.ts:10

Inherited from

ParserCommonOptions.listsAsArrays


paramPrefix?

optional paramPrefix?: string

Defined in: packages/core/src/utils/parseSQL/parseSQL.ts:104


params?

optional params?: any[] | Record<string, any>

Defined in: packages/core/src/utils/parseSQL/parseSQL.ts:106


parseParameters?

optional parseParameters?: boolean | { positional?: boolean; prefix?: string | string[]; }

Defined in: packages/core/src/utils/parseSQL/parseSQL.ts:127

When set, parameter placeholders are retained as valueSource: 'parameter' rules (value = placeholder name) instead of being dropped. Placeholders whose name is supplied via ParseSQLOptions.params are still substituted to literals first.

  • true — accept the default named prefix ':' and positional '?'.
  • { prefix } — one or more named prefixes to accept (e.g. ':', '@', '$').
  • { positional } — enable/disable positional ? (default enabled).

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.