Sp
Stored-procedure parameter. The three modes (IN / OUT / INOUT) are distinct subclasses so each carries exactly the API it needs:
In — sends a value to the procedure. No post-execute state.
Out — receives a typed value from the procedure; exposes Out.value.
InOut — sends a value and receives a (possibly modified) typed value back.
Parameters are designed to be held as references at the call site so the caller can read the post-execute values directly without tracking positional indices or parameter names:
val count = spOut<Int>()
val msg = spOut<String>()
stormify.procedure("tally", 42, count, msg)
println("${count.value}, ${msg.value}") // Int?, String? — fully typedFrom Java, the companion factories accept a raw Class<T> on JVM and Android:
Sp.Out<Integer> count = Sp.outParam(Integer.class);
Sp.Out<String> msg = Sp.outParam(String.class);
stormify.procedure("tally", 42, count, msg);
Integer v = count.getValue();Raw non-Sp arguments passed to procedure(...) are automatically wrapped as In parameters, so the common case needs no factory calls:
stormify.procedure("greet", "hello", 42, outRef) // two IN + one OUTInheritors
Stored-procedure parameter. The three modes (IN / OUT / INOUT) are distinct subclasses so each carries exactly the API it needs:
In — sends a value to the procedure. No post-execute state.
Out — receives a typed value from the procedure; exposes Out.value.
InOut — sends a value and receives a (possibly modified) typed value back.
Parameters are designed to be held as references at the call site so the caller can read the post-execute values directly without tracking positional indices or parameter names:
val count = spOut<Int>()
val msg = spOut<String>()
stormify.procedure("tally", 42, count, msg)
println("${count.value}, ${msg.value}") // Int?, String? — fully typedFrom Java, the companion factories accept a raw Class<T> on JVM and Android:
Sp.Out<Integer> count = Sp.outParam(Integer.class);
Sp.Out<String> msg = Sp.outParam(String.class);
stormify.procedure("tally", 42, count, msg);
Integer v = count.getValue();Raw non-Sp arguments passed to procedure(...) are automatically wrapped as In parameters, so the common case needs no factory calls:
stormify.procedure("greet", "hello", 42, outRef) // two IN + one OUTInheritors
Stored-procedure parameter. The three modes (IN / OUT / INOUT) are distinct subclasses so each carries exactly the API it needs:
In — sends a value to the procedure. No post-execute state.
Out — receives a typed value from the procedure; exposes Out.value.
InOut — sends a value and receives a (possibly modified) typed value back.
Parameters are designed to be held as references at the call site so the caller can read the post-execute values directly without tracking positional indices or parameter names:
val count = spOut<Int>()
val msg = spOut<String>()
stormify.procedure("tally", 42, count, msg)
println("${count.value}, ${msg.value}") // Int?, String? — fully typedFrom Java, the companion factories accept a raw Class<T> on JVM and Android:
Sp.Out<Integer> count = Sp.outParam(Integer.class);
Sp.Out<String> msg = Sp.outParam(String.class);
stormify.procedure("tally", 42, count, msg);
Integer v = count.getValue();Raw non-Sp arguments passed to procedure(...) are automatically wrapped as In parameters, so the common case needs no factory calls:
stormify.procedure("greet", "hello", 42, outRef) // two IN + one OUTInheritors
Types
INOUT parameter. The input value is sent to the procedure. After the call returns, value holds whatever the procedure left there (which may differ from input).
INOUT parameter. The input value is sent to the procedure. After the call returns, value holds whatever the procedure left there (which may differ from input).