Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Mathias Rangel Wulff edited this pageMay 12, 2016 ·8 revisions

Working with IndexedDB

Sample (try it injsFiddel):

varcityData=[{city:"Redmond",population:57530},{city:"Atlanta",population:447841},{city:"San Fracisco",population:837442}];// Create IndexdDB database and fill it with data from arrayalasql('CREATE INDEXEDDB DATABASE IF NOT EXISTS geo;\        ATTACH INDEXEDDB DATABASE geo; \        USE geo; \        DROP TABLE IF EXISTS cities; \        CREATE TABLE cities; \        SELECT * INTO cities FROM ?',[cityData],function(){// Select data from IndexedDBalasql.promise('SELECT COLUMN * FROM cities WHERE population > 100000 ORDER BY city DESC').then(function(res){document.write('Big cities: ',res.join(','));});});

Errors

All IndexedDB operations are asyncronous. This is the main reasontry catch construction does not catch errors fron IndexedDB. Please see more aboutasync code execution.

DROP

Todrop an IndexedDB database please remember to include the engine name

DROP INDEXEDDB DATABASE db_name

© 2014-2026,Andrey Gershun &Mathias Rangel Wulff

Please help improve the documentation by opening a PR on thewiki repo

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp