gdDocumentation0.8.0

API reference

GDDatabaseRows

Incremental query results. Advance with next(), decode the current row with scan() or values(), inspect err(), and release resources with close().

Methods

next

next() -> bool

Advance one row; return false on EOF or failure.

Parameters

No parameters.

Return value

bool

Suspends only the calling routine until the operation completes. No explicit await is needed.

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.

next_async

next_async() -> await bool

Advance one row; return false on EOF or failure.

Parameters

No parameters.

Return value

await bool

Returns a Signal. Use await to receive the completion value shown in the signature.

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.

scan

scan() -> Dictionary, Err

Copy the current row into a column-name dictionary.

Parameters

No parameters.

Return value

Dictionary, Err

Errors

The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.

values

values() -> Array, Err

Return current-row values in column order.

Parameters

No parameters.

Return value

Array, Err

Errors

The result carries a value and an Err. Check the error before using the value; a failure may retain partial progress. In a function returning value, Err, use ? to propagate failure to the caller. The ! operator terminates the program on failure; in serve it fails the current handler.

columns

columns() -> PackedStringArray

Return result column names.

Parameters

No parameters.

Return value

PackedStringArray

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.

err

err() -> Err

Return the reason Next returned false, or null for EOF.

Parameters

No parameters.

Return value

Err

Errors

Returns an Err object directly, not a value-and-error pair. An absent error is null; inspect the method description to distinguish creation, lookup, and stored failure.

command_tag

command_tag() -> String

Return the backend completion tag.

Parameters

No parameters.

Return value

String

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.

close

close() -> void

Close Rows without reading the remainder.

Parameters

No parameters.

Return value

void

No value is returned.

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.

cancel

cancel() -> void

Close Rows while preserving context cancellation as an Err.

Parameters

No parameters.

Return value

void

No value is returned.

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.

is_closed

is_closed() -> bool

Check whether Rows reached EOF, failure, or explicit closure.

Parameters

No parameters.

Return value

bool

Errors

This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.