Skip to main content

xlucene-translator / translator/sql/translate

translator/sql/translate

Functions​

translateSQLQuery()​

translateSQLQuery(parser, options): SQLResult

Defined in: xlucene-translator/src/translator/sql/translate.ts:34

Translate an xLucene query to a SQL boolean expression.

It walks the AST the same way translateQuery does for the Elasticsearch DSL, with the same rules for dropping a branch. Engine-specific SQL comes from options.dialect.

The result is an expression for a WHERE clause, not a full statement.

Parameters​

ParameterType
parserParser
optionsUtilsTranslateSQLOptions

Returns​

SQLResult