API reference
GDDatabaseTx
Dedicated client holding one physical connection until the transaction ends.
Methods
query(sql: String, args: Array = []) -> Dictionary, Errquery_async(sql: String, args: Array = []) -> await Dictionary, Errquery_row(sql: String, args: Array = []) -> Dictionary, Errquery_row_async(sql: String, args: Array = []) -> await Dictionary, Errquery_rows(sql: String, args: Array = []) -> GDDatabaseRows, Errquery_rows_async(sql: String, args: Array = []) -> await GDDatabaseRows, Erris_active() -> bool
query
query(sql: String, args: Array = []) -> Dictionary, ErrReturn the completion signal without waiting, for composition.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sql | String | Required | SQL statement; bind external values through the separate parameter array. |
args | Array | [] | Arguments in call or parameter-binding order. |
Return value
Dictionary, Err
Suspends only the calling routine until the operation completes. No explicit await is needed.
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.
query_async
query_async(sql: String, args: Array = []) -> await Dictionary, ErrReturn the completion signal without waiting, for composition.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sql | String | Required | SQL statement; bind external values through the separate parameter array. |
args | Array | [] | Arguments in call or parameter-binding order. |
Return value
await Dictionary, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
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.
query_row
query_row(sql: String, args: Array = []) -> Dictionary, ErrReturn query_row's completion signal without waiting, for composition.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sql | String | Required | SQL statement; bind external values through the separate parameter array. |
args | Array | [] | Arguments in call or parameter-binding order. |
Return value
Dictionary, Err
Suspends only the calling routine until the operation completes. No explicit await is needed.
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.
query_row_async
query_row_async(sql: String, args: Array = []) -> await Dictionary, ErrReturn query_row's completion signal without waiting, for composition.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sql | String | Required | SQL statement; bind external values through the separate parameter array. |
args | Array | [] | Arguments in call or parameter-binding order. |
Return value
await Dictionary, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
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.
query_rows
query_rows(sql: String, args: Array = []) -> GDDatabaseRows, ErrReturn query_rows' completion signal without waiting, for composition.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sql | String | Required | SQL statement; bind external values through the separate parameter array. |
args | Array | [] | Arguments in call or parameter-binding order. |
Return value
GDDatabaseRows, Err
Suspends only the calling routine until the operation completes. No explicit await is needed.
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.
query_rows_async
query_rows_async(sql: String, args: Array = []) -> await GDDatabaseRows, ErrReturn query_rows' completion signal without waiting, for composition.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sql | String | Required | SQL statement; bind external values through the separate parameter array. |
args | Array | [] | Arguments in call or parameter-binding order. |
Return value
await GDDatabaseRows, Err
Returns a Signal. Use await to receive the completion value shown in the signature.
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.
is_active
is_active() -> boolCheck whether the transaction remains usable.
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.