Skip to content

feat: add sqlQueryWithoutTx() method for non-transactional queries - #73

Merged
vchaindz merged 1 commit into
codenotary:masterfrom
princeavo:feature/add-sqlquery-without-transaction
Dec 29, 2025
Merged

vchaindz merged 1 commit into
codenotary:masterfrom
princeavo:feature/add-sqlquery-without-transaction

Conversation

@princeavo

Copy link
Copy Markdown
Contributor

Implements non-transactional SQL query using streaming SQLQuery gRPC call. This allows access to full database history beyond transaction snapshots, which is essential for HISTORY OF queries with _rev = 1.

Fixes issue where Java client returned only 21 records vs CLI's 491 records when querying historical data with HISTORY OF.

  • Adds sqlQueryWithoutTx(String, SQLValue...) method
  • Adds sqlQueryWithoutTx(String, Map<String, SQLValue>) method
  • Uses blockingStub.sQLQuery() instead of txSQLQuery()
  • Maintains same parameter support as existing sqlQuery() methods

This enables Java applications to properly query immutable audit trails, which is critical for compliance and audit purposes.

@vchaindz

Copy link
Copy Markdown
Contributor

Thanks a lot @princeavo - but it would be important to add some test coverage for the new functionality

@princeavo

Copy link
Copy Markdown
Contributor Author

Thanks a lot @princeavo - but it would be important to add some test coverage for the new functionality

Thanks for the review! Good point. I’ll add test coverage for the new SQLQuery functionality.

@princeavo
princeavo force-pushed the feature/add-sqlquery-without-transaction branch from 904683b to e25b83e Compare December 28, 2025 15:23
@princeavo

Copy link
Copy Markdown
Contributor Author

Thanks a lot @princeavo - but it would be important to add some test coverage for the new functionality

Hi @vchaindz Done! Tests added.

@vchaindz

Copy link
Copy Markdown
Contributor

Great @princeavo can you please sign the commit and we'll merge

@princeavo
princeavo force-pushed the feature/add-sqlquery-without-transaction branch from e25b83e to 1d66fca Compare December 29, 2025 12:23
Implements non-transactional SQL query using streaming SQLQuery gRPC call.
This allows access to full database history beyond transaction snapshots,
which is essential for HISTORY OF queries with _rev = 1.

Fixes issue where Java client returned only 21 records vs CLI's 491 records
when querying historical data with HISTORY OF.

- Adds sqlQueryWithoutTx(String, SQLValue...) method
- Adds sqlQueryWithoutTx(String, Map<String, SQLValue>) method
- Uses blockingStub.sQLQuery() instead of txSQLQuery()
- Maintains same parameter support as existing sqlQuery() methods

This enables Java applications to properly query immutable audit trails,
which is critical for compliance and audit purposes.
@princeavo
princeavo force-pushed the feature/add-sqlquery-without-transaction branch from 1d66fca to 0aac0f8 Compare December 29, 2025 12:29
@princeavo

Copy link
Copy Markdown
Contributor Author

Great @princeavo can you please sign the commit and we'll merge

@vchaindz Done! The commit has been signed.

@vchaindz
vchaindz merged commit e3c22ce into codenotary:master Dec 29, 2025
1 check passed
@princeavo

Copy link
Copy Markdown
Contributor Author

Thank you for merging! Happy to contribute to immudb4j. 🙏

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