W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: IndexedDB: Retrieving a slice of a record value.

From: Odin Hørthe Omdal <odinho@opera.com>
Date: Tue, 17 Apr 2012 13:36:55 +0200
To: public-webapps@w3.org, "Joran Greef" <joran@ronomon.com>
Message-ID: <op.wcwqjtwb49xobu@odinho.eng.oslo.osa>
On Tue, 17 Apr 2012 13:28:07 +0200, Joran Greef <joran@ronomon.com> wrote:

> It would be great if there was a way to use IndexedDB to get just a
> slice of a record value, not the entire value.
> For example, when storing many large binary values, there may be
> useful meta or header info at the start or end of each value, which
> could be retrieved directly.
> It would be a waste to have to store this data twice, or to read the
> entire value.

Do the split beforehand, and store it in two?

Instead of:

     { myblob: HHBBBBBBBBBBB }

You'd do:

     { myheader: HH, myblob: BBBBBBBBBBBB }

And just stitch it together again when you need to feed it somewhere.

-- 
Odin Hørthe Omdal (Velmont/odinho) · Core, Opera Software ·  
http://opera.com/
Received on Tuesday, 17 April 2012 11:37:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:51 GMT