Bug 225988

Summary: Introduce SQLiteStatement::columnBlobView()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, alecflett, beidson, darin, ews-watchlist, ggaren, jsbell, sam, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>