Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bindings/java] Implement for jdbc's ResultSet #743

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

seonWKim
Copy link
Contributor

Purpose of this PR

Associate jdbc's ResultSet with the returned values from limbo's step function.

Changes

Rust

  • Java_org_github_tursodatabase_core_LimboStatement_step now returns an object of java's LimboStepResult.java

Java

  • Added LimboStepResult.java in order to distinguish the type of StepResult(which limbo returns) and to encapsulate the interpretation of limbo's StepResult
  • Change JDBC4ResultSet inheriting LimboResultSet to composition. IMO when using inheritance, it's too burdensome to fit unmatching parts together.
  • Enhance JDBC4Statement.java's execute method
    • By looking at the ResultSet created after executing the qury, it's now able to determine the (boolean) result.

Reference

@seonWKim seonWKim marked this pull request as draft January 19, 2025 07:49
@seonWKim
Copy link
Contributor Author

seonWKim commented Jan 19, 2025

limbo always returns StepResult::IO after returning the results of SELECT.
image

But in my local, it works as follows
image

@seonWKim seonWKim force-pushed the java-bindings-limbo-resultset branch from a797418 to 92058d2 Compare January 19, 2025 08:15
@seonWKim seonWKim marked this pull request as ready for review January 19, 2025 08:21
@seonWKim
Copy link
Contributor Author

seonWKim commented Jan 19, 2025

Not sure why the test fails on workflow but works on my local machine. I'll further investigate and add the work in the following PRs(as this PR is getting big)

Maybe it's due to more restricted environment e.g. less number of threads(maybe one thread)

@seonWKim seonWKim force-pushed the java-bindings-limbo-resultset branch from 1ef296d to e8a62b6 Compare January 19, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant