mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
Add LimboStepResult.java constructor
This commit is contained in:
parent
b80438226b
commit
f80823a297
2 changed files with 10 additions and 3 deletions
|
@ -133,13 +133,12 @@ fn to_limbo_step_result<'local>(
|
|||
"(I[Ljava/lang/Object;)V",
|
||||
&ctor_args,
|
||||
)
|
||||
.unwrap_or_else(|_| JObject::null())
|
||||
} else {
|
||||
env.new_object(
|
||||
"org/github/tursodatabase/core/LimboStepResult",
|
||||
"(I[Ljava/lang/Object;)V",
|
||||
"(I)V",
|
||||
&ctor_args,
|
||||
)
|
||||
.unwrap_or_else(|_| JObject::null())
|
||||
}
|
||||
.unwrap_or_else(|_| JObject::null())
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.github.tursodatabase.core;
|
|||
import java.util.Arrays;
|
||||
|
||||
import org.github.tursodatabase.annotations.NativeInvocation;
|
||||
import org.github.tursodatabase.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents the step result of limbo's statement's step function.
|
||||
|
@ -17,8 +18,15 @@ public class LimboStepResult {
|
|||
|
||||
// Identifier for limbo's StepResult
|
||||
private final int stepResultId;
|
||||
@Nullable
|
||||
private final Object[] result;
|
||||
|
||||
@NativeInvocation(invokedFrom = "limbo_statement.rs")
|
||||
public LimboStepResult(int stepResultId) {
|
||||
this.stepResultId = stepResultId;
|
||||
this.result = null;
|
||||
}
|
||||
|
||||
@NativeInvocation(invokedFrom = "limbo_statement.rs")
|
||||
public LimboStepResult(int stepResultId, Object[] result) {
|
||||
this.stepResultId = stepResultId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue