• Public
  • Public/Protected
  • All

Interface SqlStatementOptions

Options used to change behavior of an SQL query.


  • SqlStatementOptions



Optional cursorBufferSize

cursorBufferSize: number

The cursor buffer size (measured in the number of rows).

When a statement is submitted for execution, a SqlResult is returned as a result. When rows are ready to be consumed, they are put into an internal buffer of the cursor. This parameter defines the maximum number of rows in that buffer. When the threshold is reached, the backpressure mechanism will slow down the execution, possibly to a complete halt, to prevent out-of-memory.

Only positive values are allowed.

The default value is expected to work well for most workloads. A bigger buffer size may give you a slight performance boost for queries with large result sets at the cost of increased memory consumption.

Defaults to 4096.

Optional expectedResultType

expectedResultType: "ANY" | "ROWS" | "UPDATE_COUNT"

Expected result type of SQL query. By default, set to ANY. Available values are ANY, ROWS, and UPDATE_COUNT.

Optional returnRawResult

returnRawResult: boolean

If true, SQL result will iterate over SqlRows. If false SQL result, will iterate over regular objects. Defaults to false.

Optional schema

schema: string

The schema name. The engine will try to resolve the non-qualified object identifiers from the statement in the given schema. If not found, the default search path will be used, which looks for objects in the predefined schemas partitioned and public.

  • The schema name is case sensitive. For example, foo and Foo are different schemas.
  • The default value is null meaning only the default search path is used.

Optional timeoutMillis

timeoutMillis: number

The execution timeout in milliseconds. If the timeout is reached for a running statement, it will be cancelled forcefully. Zero value means no timeout. -1 means that the timeout in server config will be used. Other negative values are prohibited. Defaults to -1.

Generated using TypeDoc