You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unify statement result attachment and remove the closed=false window #211
Unify statement result attachment and remove the transient closed = false window. assignResultSet and executeResult are near copies, and closeResultSet flips closed and closing so a nested close can pass the closed check.
LibsqlStatementLifecycleTest covers post-close execute returning a closed result set, close-on-completion, and the requested-result-set error. LibsqlStatementConcurrencyTest covers execute against close. The xerial StatementTest, PrepStmtTest, and MetadataLeakTest cover the same surface.
Scope
Add one attachResult(...) used by both paths, with a discardCurrentResult() for the closed branch.
Add LibsqlResultSet.closeDetached() that closes without calling back into the statement.
Replace the flag flip in closeResultSet (329 to 342).
Share newQueryResult(...) between LibsqlStatement.executeQuery and LibsqlPreparedStatement.executeQuery.
Preserve
Post-close execute, executeQuery, executeUpdate, and getConnection keep working and return a closed result set.
A second result set on the same statement throws "ResultSet already requested".
closeOnCompletion and isCloseOnCompletion keep the lower-case "statement is closed" message.
Metadata result sets never use close-on-completion.
updateCount is -1 when a result set exists and the affected row count otherwise.
Acceptance
closed is never written outside close() and closeDetached, and no method temporarily reopens the statement.
LibsqlStatement.java is under 650 lines.
./mvnw -pl libsql-jdbc -am test green with no assertion edited.
./mvnw -pl libsql-itests -am verify green with DOCKER_CONFIG set per AGENTS.md section 4.
Activity
test(jdbc): pin attached schema, date time, and savepoint edges (#215)