Skip to content

Conversation

@zhou-hao
Copy link
Member

@zhou-hao zhou-hao commented Nov 8, 2025

Note

Make CLOB encoding/decoding and null handling column-aware, replacing ClobValue with LongCharSequence and updating executors/builders (incl. Oracle) and tests accordingly.

  • Core:
    • Add column-aware ValueCodec.encodeNull(ColumnMetadata) and use it in AbstractColumnMetadata and rdb/metadata/RDBColumnMetadata.
  • RDB Codecs:
    • ClobValueCodec: add isClobType, return NullValue for column-aware nulls, wrap CLOB text as LongCharSequence.
    • JsonValueCodec: use column-aware nulls and LongCharSequence for CLOB columns; expand decode support (e.g., Reader, typed blobs) and handle null targets.
    • New LongCharSequence replaces prior CLOB wrapper; used for streaming/Clob binding.
    • NullValue: store explicit type, improve getType() and toString(), add of(DataType) helper.
  • Executors:
    • JDBC: bind LongCharSequence via setCharacterStream; honor NullValue SQL types.
    • R2DBC: bind LongCharSequence as Clob; bind NullValue by Java type, special-case CLOB nulls.
  • Oracle SQL Builders:
    • OracleBatchUpsertOperator and OracleInsertSqlBuilder: encode values per column; for batched CLOB nulls, substitute empty LongCharSequence to avoid null binding.
  • Tests/Infra:
    • Add batch save tests (sync/reactive) and adjust Oracle connection providers; minor test formatting tweaks.

Written by Cursor Bugbot for commit 7e43d63. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

}

public Class<?> getType() {
return type == null ? dataType.getJavaType() : type;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Null Pointers: Inconsistent Null Handling.

The getType() method can throw NullPointerException when type is null and dataType is also null, since it calls dataType.getJavaType() without null-checking dataType. The @NonNull annotation was removed from the dataType field, allowing null values, but the getter doesn't handle this case.

Fix in Cursor Fix in Web

@zhou-hao zhou-hao merged commit 6ed3955 into 4.2 Nov 20, 2025
1 of 2 checks passed
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.

2 participants