Skip to content

toSqlWhere

function toSqlWhere(filter?, startParamIndex?): SqlWhereResult;

Translate Kuralle’s MongoDB-style VectorFilter into a PostgreSQL WHERE clause targeting a metadata JSONB column. Values are parameterized; operators not in the supported set throw UnsupportedFilterOperatorError.

Parameter Type Default value Description

filter?

VectorFilter

undefined

MongoDB-style filter.

startParamIndex?

number

1

First positional parameter index (defaults to 1). Pass n+1 when the caller has already bound n parameters upstream.

SqlWhereResult