Skip to content

Extract LibsqlBlob and LibsqlClob from LibsqlResultSet #199

Closed

Description

@magnusp

Goal

Move the read-only Blob and Clob implementations out of LibsqlResultSet. They are two static nested classes of about 204 lines that never touch the enclosing instance or the cursor.

Depends on

#198. Same file, so this runs after the REAL formatter moves.

Pin

LibsqlResultSetTest covers getBlob and getClob values, NULL streams, and byte and character stream parity. The upstream ResultSetTest exercises the LOB paths.

Scope

  • Create package-private top-level LibsqlBlob and LibsqlClob from LibsqlResultSet 1293 to 1497.
  • Keep the package-private constructors used by getBlob (944) and getClob (948).

Preserve

  • The read-only and freed exception messages, and the position and length validation messages.
  • free() nulls the backing bytes or text.
  • LibsqlClob.getAsciiStream() uses US_ASCII.

Acceptance

  • LibsqlBlob.java and LibsqlClob.java exist and hold the moved code unchanged.
  • LibsqlResultSet.java is under 1050 lines.
  • ./mvnw -pl libsql-jdbc -am test green with no assertion edited.
  • ./mvnw spotless:check green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority: edge case, feature gap, or test/process improvement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions