KScript docs
EN

loopback_json_connection fields and methods

A field is a plain fact about the value, read with a dot and no brackets: $value.name. A method takes arguments or does work, and is called with ->: $value->name(arguments), or with the value piped in: $value |> name(arguments).

From KScript.Net

These need <import package="KScript.Net" />import KScript.Net. See KScript.Net.

#loopback_json_connection->transaction(action: fn) → any KScript.Net

Gives action exclusive use of the connection and returns its result. If action throws, the connection closes.
ParameterTakes
action requiredfn
Example
<echo>{ @with_loopback_json(8765, fn(connection) => $connection->transaction(fn(stream) => $stream->read())) }</echo>
echo @with_loopback_json(8765, fn(connection) => $connection->transaction(fn(stream) => $stream->read()))

Methods from any