Skip to content

Add delayLoadingLobs#1336

Merged
rene-ye merged 12 commits intomicrosoft:devfrom
rene-ye:blob
May 26, 2020
Merged

Add delayLoadingLobs#1336
rene-ye merged 12 commits intomicrosoft:devfrom
rene-ye:blob

Conversation

@rene-ye
Copy link
Copy Markdown
Member

@rene-ye rene-ye commented May 14, 2020

Adds a property delayLoadingLobs which will cause all LOB objects retrieved from the ResultSet to not be streamed.

The driver does this by setting a boolean on every LOB object when retrieved via a getter. This boolean is then used by the LOB object when users call stream getters.

@rene-ye rene-ye added the Public API Changes in Public API label May 14, 2020
@rene-ye rene-ye changed the title Add loadLoargeObjects Add loadLargeObjects May 14, 2020
@rene-ye rene-ye added this to the 8.3.1 milestone May 14, 2020
rene-ye added 4 commits May 21, 2020 14:30
# Conflicts:
#	src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java
#	src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
#	src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBlob.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java Outdated
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/unit/lobs/LobsTest.java
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/unit/lobs/LobsTest.java
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/unit/lobs/LobsTest.java
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/unit/lobs/LobsTest.java
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBlob.java Outdated
@TarasTielkes
Copy link
Copy Markdown

(I'm adding this comment as a user that follows the project, but does not actively participate - if this is not the right place for this comment, please let me know)

It would be good to document the intent of this API. Why would I, as a user of the driver, want to set the loadLargeObjects property? What are the benefits, and what are the downsides? Interacting with large volumes of large BLOBs is a tricky area in my experience, so a clear description of what this API intends to facilitate would be a good idea, methinks.

I do agree with the comments from @peterbae regarding the naming, FWIW.

@rene-ye rene-ye changed the title Add loadLargeObjects Add delayLoadingLobs May 25, 2020
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerLob.java
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java Outdated
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/unit/lobs/LobsTest.java
peterbae
peterbae previously approved these changes May 25, 2020
ulvii
ulvii previously approved these changes May 26, 2020
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBlob.java
@rene-ye rene-ye dismissed stale reviews from ulvii and peterbae via f79f76d May 26, 2020 16:46
lilgreenbird
lilgreenbird previously approved these changes May 26, 2020
Copy link
Copy Markdown
Contributor

@ulvii ulvii left a comment

Choose a reason for hiding this comment

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

There are conflicts in the PR.

@rene-ye rene-ye merged commit 54c6748 into microsoft:dev May 26, 2020
@ulvii
Copy link
Copy Markdown
Contributor

ulvii commented May 27, 2020

Hi @TarasTielkes ,
Thanks for the suggestions. We will definitely document the property on MSDN once it is in production release. To give you a brief idea about it, as of 7.0.0 version of the driver, we introduced some changes to the way the driver handles LOB streaming and the new property is meant to provide backward compatibility with 6.4.0 version of the driver for some edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Public API Changes in Public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants