Skip to main content

@terascope/types / sql-interfaces / SQLSearchParams

Interface: SQLSearchParams

Defined in: packages/types/src/sql-interfaces.ts:79

The SQL counterpart of ClientParams.SearchParams: everything a complete statement needs besides the query itself.

Elasticsearchhere
indextable, or relation for an expression
sizeLIMIT
fromOFFSET
sortextra ORDER BY entries
_source_includes / _source_excludesincludes / excludes, into the SELECT list

Properties​

PropertyTypeDescriptionDefined in
excludes?string[]Fields the caller wants left out, combined with the configured excludes.packages/types/src/sql-interfaces.ts:109
from?numberRows to skip. Must be a non-negative integer.packages/types/src/sql-interfaces.ts:97
includes?string[]Fields the caller wants, filtered by what the configuration permits.packages/types/src/sql-interfaces.ts:107
relation?stringA SQL source expression used as-is, for sources that are not a plain table name, such as read_parquet(['s3://bucket/a.parquet']), a subquery or a join. It is not escaped, so never build it from untrusted input. Use table for a name.packages/types/src/sql-interfaces.ts:93
size?numberRow limit. Must be a non-negative integer.packages/types/src/sql-interfaces.ts:95
sort?SQLSort[]Ordering, appended to whatever the query itself asked for. A geoDistance query produces its own sort; when it does, it comes first. Each entry's expression is used as-is; see SQLSort.expression.packages/types/src/sql-interfaces.ts:105
table?stringThe table to select from, quoted as an identifier. A dot separates catalog, schema and table - main.public.events becomes "main"."public"."events" - so a name is never taken as raw SQL.packages/types/src/sql-interfaces.ts:86