Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FbBlobStream #127

Merged
merged 3 commits into from
Nov 12, 2024
Merged

FbBlobStream #127

merged 3 commits into from
Nov 12, 2024

Conversation

la-we
Copy link
Contributor

@la-we la-we commented Dec 6, 2023

Added FbBlobStream to be able to stream a blob from the database rather than having to fetch it completely. Especially useful when dealing with large BLOBs.

This is a working but possibly not clean solution. Have a look whether something should be cleaned up or improved.

@cincuranet
Copy link
Owner

Nice. Please give me some time to review it, as I'm currently busy.

@la-we
Copy link
Contributor Author

la-we commented Jan 30, 2024

Hey Jiri,

i have addressed your feedback in this updated commit! Thanks a lot for having an in-depth look at the changes!

@cincuranet
Copy link
Owner

@la-we Sorry for not taking another look sooner. I was busy with work and stuff. I'll do another pass in upcoming days.

Copy link
Owner

@cincuranet cincuranet left a comment

Choose a reason for hiding this comment

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

In general looks good. Just some small nits.


if (buffer.Length == 0)
{
// previous segment was last, this has no data
Copy link
Owner

Choose a reason for hiding this comment

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

Fix spaces in comment.

src/FirebirdSql.Data.FirebirdClient/Common/BlobBase.cs Outdated Show resolved Hide resolved
src/FirebirdSql.Data.FirebirdClient/Common/BlobBase.cs Outdated Show resolved Hide resolved
src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs Outdated Show resolved Hide resolved
src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs Outdated Show resolved Hide resolved
src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs Outdated Show resolved Hide resolved
@fdcastel
Copy link
Contributor

@la-we could you rebase with the latest master and work on the requested changes?

This would be a nice addition to the project.

@la-we
Copy link
Contributor Author

la-we commented Oct 28, 2024

@cincuranet Addressed your feedback. Sorry for the long waiting period...
@fdcastel Done!

@cincuranet
Copy link
Owner

@la-we Few pending comments left, mostly formatting. Otherwise LGTM and I'll merge after these are addressed.

@cincuranet
Copy link
Owner

@la-we Are you aware of the failing test?

1) Error : FirebirdSql.Data.FirebirdClient.Tests.BlobStreamTests(Embedded,False,Disabled).FbBlobStreamReadTest
FirebirdSql.Data.Common.IscException : invalid BLOB handle
   at FirebirdSql.Data.Client.Native.StatusVectorHelper.ProcessStatusVector(IntPtr[] statusVector, Charset charset, Action`1 warningMessage) in /_/src/FirebirdSql.Data.FirebirdClient/Client/Native/StatusVectorHelper.cs:line 39
   at FirebirdSql.Data.Client.Native.FesDatabase.ProcessStatusVector(IntPtr[] statusVector) in /_/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesDatabase.cs:line 393
   at FirebirdSql.Data.Client.Native.FesBlob.CloseAsync(CancellationToken cancellationToken) in /_/src/FirebirdSql.Data.FirebirdClient/Client/Native/FesBlob.cs:line 433
   at FirebirdSql.Data.Common.BlobStream.DisposeAsync() in /_/src/FirebirdSql.Data.FirebirdClient/Common/BlobStream.cs:line 209
   at FirebirdSql.Data.FirebirdClient.Tests.BlobStreamTests.FbBlobStreamReadTest() in /_/src/FirebirdSql.Data.FirebirdClient.Tests/BlobStreamTests.cs:line 42
   at FirebirdSql.Data.FirebirdClient.Tests.BlobStreamTests.FbBlobStreamReadTest() in /_/src/FirebirdSql.Data.FirebirdClient.Tests/BlobStreamTests.cs:line 46
   at FirebirdSql.Data.FirebirdClient.Tests.BlobStreamTests.FbBlobStreamReadTest() in /_/src/FirebirdSql.Data.FirebirdClient.Tests/BlobStreamTests.cs:line 37
   at FirebirdSql.Data.FirebirdClient.Tests.BlobStreamTests.FbBlobStreamReadTest() in /_/src/FirebirdSql.Data.FirebirdClient.Tests/BlobStreamTests.cs:line 48

@la-we
Copy link
Contributor Author

la-we commented Nov 5, 2024

Nope, did not notice to be honest. I'll have a look at the failing tests

@la-we
Copy link
Contributor Author

la-we commented Nov 7, 2024

@cincuranet Tests are fixed!

@cincuranet
Copy link
Owner

Nice. I'll fix the #127 (comment) post merge. Thanks for your contribution!

@cincuranet cincuranet merged commit 128156f into cincuranet:master Nov 12, 2024
24 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.

3 participants