Bug 225988 - Introduce SQLiteStatement::columnBlobView()
Summary: Introduce SQLiteStatement::columnBlobView()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-19 15:35 PDT by Chris Dumez
Modified: 2021-05-19 17:52 PDT (History)
10 users (show)

See Also:


Attachments
Patch (15.62 KB, patch)
2021-05-19 15:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-05-19 15:35:19 PDT
Introduce SQLiteStatement::columnBlobView() to get a "view" to the blob instead of copying the data. This is more efficient for call sites that do not need to hold on the the Blob data.
Comment 1 Chris Dumez 2021-05-19 15:36:30 PDT
Created attachment 429103 [details]
Patch
Comment 2 Alex Christensen 2021-05-19 16:39:17 PDT
Comment on attachment 429103 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=429103&action=review

> Source/WebCore/platform/sql/SQLiteStatement.h:75
> +    class BlobView {

We really need to start using std::span for things like this.
Comment 3 Chris Dumez 2021-05-19 16:44:43 PDT
(In reply to Alex Christensen from comment #2)
> Comment on attachment 429103 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=429103&action=review
> 
> > Source/WebCore/platform/sql/SQLiteStatement.h:75
> > +    class BlobView {
> 
> We really need to start using std::span for things like this.

Yes, someone just needs to import it :P
Comment 4 Alex Christensen 2021-05-19 16:52:46 PDT
I volunteer myself.
Comment 5 Chris Dumez 2021-05-19 17:11:06 PDT
(In reply to Alex Christensen from comment #4)
> I volunteer myself.

👍
Comment 6 EWS 2021-05-19 17:51:43 PDT
Committed r277768 (237931@main): <https://commits.webkit.org/237931@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 429103 [details].
Comment 7 Radar WebKit Bug Importer 2021-05-19 17:52:20 PDT
<rdar://problem/78234144>