Skip to content

@sqlrooms/duckdb / makeLimitQuery

Function: makeLimitQuery()

makeLimitQuery(query, options): string

Make a limit query from a query and a limit.

Parameters

ParameterTypeDescription
querystringThe SELECT query to make limited.
options{ limit: number; offset: number; sanitize: boolean; }The options for the limit query.
options.limit?numberThe number of rows to limit the query to.
options.offset?numberThe number of rows to offset the query by.
options.sanitize?booleanWhether to sanitize the query.

Returns

string

The limited query.