IndexedDB API Playground

248 views
Skip to first unread message

axemclion

unread,
Apr 26, 2011, 12:28:46 PM4/26/11
to Chromium HTML5
I was working on some IndexedDB API examples and thought of sharing
them with the group.
The IndexedDB API playground basically lists the various concepts
defined in the specification and has examples for each case.

It works great with the latest Canary build.

It is available at http://nparashuram.com/trialtool/index.html#example=/ttd/IndexedDB/webkitIndexedDB.html

Would love to hear your feedback on this.

Eric Bidelman

unread,
Apr 26, 2011, 12:44:08 PM4/26/11
to axemclion, Chromium HTML5
This is really fantastic! There's nothing else out there like this and hardly any examples.
Two comments:

- It would be great if the samples worked in both FF and Chrome. I think we're at
a point where both implementations are stabilizing but there could still be some
discrepancies.

- Sometimes when I click run, there's a significant delay when the code is executed
and the output shows in the console. What gives? I'm worried developers might get the impression indexedDB is slow.


--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.




--
Eric Bidelman
Developer Relations - Google
e.bid...@google.com

axemclion

unread,
Apr 26, 2011, 1:15:48 PM4/26/11
to Chromium HTML5
Here are the examples for all the browsers http://nparashuram.com/ttd/IndexedDB/index.html.

On you second point, the delay is actually due to the wait function
where I check for the availability of a variable before running the
function. For example, objectStore is dependent on open() call, and
this dependency is handled using a setTimeout and checking for
variables.

On Apr 26, 9:44 pm, Eric Bidelman <ericbidel...@chromium.org> wrote:
> This is really fantastic! There's nothing else out there like this and
> hardly any examples.
> Two comments:
>
> - It would be great if the samples worked in both FF and Chrome. I think
> we're at
> a point where both implementations are stabilizing but there could still be
> some
> discrepancies.
>
> - Sometimes when I click run, there's a significant delay when the code is
> executed
> and the output shows in the console. What gives? I'm worried developers
> might get the impression indexedDB is slow.
>
>
>
>
>
>
>
>
>
> On Tue, Apr 26, 2011 at 9:28 AM, axemclion <n.parashu...@gmail.com> wrote:
> > I was working on some IndexedDB API examples and thought of sharing
> > them with the group.
> > The IndexedDB API playground basically lists the various concepts
> > defined in the specification and has examples for each case.
>
> > It works great with the latest Canary build.
>
> > It is available at
> >http://nparashuram.com/trialtool/index.html#example=/ttd/IndexedDB/we...
>
> > Would love to hear your feedback on this.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium HTML5" group.
> > To post to this group, send email to chromium-ht...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-html5+unsubscr...@chromium.org.
> > For more options, visit this group at
> >http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.
>
> --
> Eric Bidelman
> Developer Relations - Google
> e.bidel...@google.com

macrojd

unread,
May 9, 2011, 6:30:56 PM5/9/11
to Chromium HTML5

I have a doubt about this API. Has it a string search function
available? I mean, can you search for a specific string in the object
store, or the search function is just restricted to full values and
keywords?

Thanks
JD


On Apr 26, 1:15 pm, axemclion <n.parashu...@gmail.com> wrote:
> Here are the examples for all the browsershttp://nparashuram.com/ttd/IndexedDB/index.html.

Jeremy Orlow

unread,
May 10, 2011, 3:44:01 PM5/10/11
to macrojd, Chromium HTML5
The latter.  Full text search can be implemented on top of IndexedDB, though it's admittedly not a simple task to do so.

J

To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.

axemclion

unread,
May 10, 2011, 10:34:57 PM5/10/11
to Chromium HTML5
I had read mail threads about full text search being an ask in the
IndexedDB specification, but looks like it was postponed for the next
version.

Jeremy Orlow

unread,
May 11, 2011, 1:25:36 AM5/11/11
to axemclion, Chromium HTML5
One can implement full text on top of IndexedDB.  I hope someone attempts this and makes a library of it since it is the type of thing a lot of people would like to do.

J

To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.

axemclion

unread,
May 11, 2011, 1:58:25 AM5/11/11
to Chromium HTML5
Would be an interesting library to build. However, without inverted
indexes supported by the database itself, it would be harder to really
build something like this in Javascript library.

Would love to have a discussion if something like this is to be
built.

Jeremy Orlow

unread,
May 11, 2011, 2:52:26 AM5/11/11
to axemclion, Chromium HTML5
Agreed it wouldn't be trivial (since there is no inverted index primitive) but it is possible.

J

To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.

macrojd

unread,
May 11, 2011, 8:31:17 AM5/11/11
to Chromium HTML5

Thanks guys. It's kind of crazy to have to make some basic feature by
ourselves. I don't need it right now, but when I was making some
sample codes and testing the API, after creating the Object Stores I
was trying to find the way to search for a short text. The only way I
can think of is loading the entire Object Store in memory and make a
for loop to use search() or something like that to match the texts.

JD
Reply all
Reply to author
Forward
0 new messages