Documentation/SQLiteStatement
classWORKER

SQLiteStatement

js/foo_uie_jsplitter.js:4139

Prepared SQLite statement returned by Prepare.
A prepared statement is usable immediately after Prepare succeeds. Its native SQLite handle is finalized automatically when the JavaScript object is destroyed, so explicit cleanup is not required for normal use. Close is provided only for releasing the native statement immediately when it is no longer needed.
Run and Query automatically reset the statement and clear all parameter bindings before returning, including when execution throws, so the same active statement can be reused immediately with a new parameter array.
Statement operations report parameter, binding, execution, result-conversion, and closed-handle errors as JavaScript exceptions. Close is idempotent and does not throw.

propertyWORKERreadonly

IsOpen

js/foo_uie_jsplitter.js:4189
IsOpen: boolean = false

Indicates whether the prepared statement still owns an active native SQLite handle.
This is true immediately after Prepare succeeds and becomes false after Close is called. Normally there is no need to check this property unless the statement is being closed explicitly.

methodWORKER

Close

js/foo_uie_jsplitter.js:4151
Close()

Finalizes the prepared statement immediately and releases its native SQLite handle. Calling Close more than once is allowed.
Explicit cleanup is optional: the statement is finalized automatically when the JavaScript object is destroyed. Use Close when early release is useful, for example when many prepared statements are created while other work continues.
This method does not throw; any SQLite finalize status is not exposed to script code.

Returns

boolean —

true after the statement has been closed.

methodWORKER

Query

js/foo_uie_jsplitter.js:4170
Query(parameters)

Executes the prepared statement and returns all result rows. The statement is reset and its bindings are cleared before returning.

Parameters

NameTypeDescription
parametersoptionalArray<*>

Positional parameter values. The count must match the prepared statement exactly.

Returns

Array<Object> —

Query rows as plain JavaScript objects.

Throws

Error —

On parameter, binding, execution, or result-conversion errors, including an invalid parameter array/count, duplicate result column names, or when the statement is closed.

methodWORKER

Reset

js/foo_uie_jsplitter.js:4180
Reset()

Explicitly resets the statement and clears its current parameter bindings.
This is normally unnecessary after Run or Query, because both methods do it automatically.

Throws

Error —

If the statement is closed or SQLite fails to clear its parameter bindings.

methodWORKER

Run

js/foo_uie_jsplitter.js:4161
Run(parameters)

Executes the prepared statement and discards any result rows. The statement is reset and its bindings are cleared before returning.

Parameters

NameTypeDescription
parametersoptionalArray<*>

Positional parameter values. The count must match the prepared statement exactly.

Throws

Error —

On parameter, binding, or execution errors, including an invalid parameter array/count or when the statement is closed.