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

Storage APIs

Rob Parham edited this pageSep 25, 2017 ·2 revisions

There are currently 5 ways jSQL can store data. If you're using Node, it will always use the filesystem API to store raw data in a file called.jsqldatastore, otherwise jSQL will attempt to use one of four other available APIs:indexedDB,WebSQL,localStorage orcookies - in that order. jSQL provides methods for you to prioritize which APIs are tried first and for you to see which one is actually used.


jSQL.setApiPriority(api [,...])

Change the default API priority order.This method must be called beforejSQL.load().

Parameters

Pass it the name of the APIs you want to use in the order you want them tried. API names are:indexedDBAPI,WebSQLAPI,localStorageAPI,cookieAPI.

Example
jSQL.setApiPriority('localStorageAPI', 'WebSQLAPI');

jSQL.getApi()

Get the name of the API that is being used. Will return any of these:indexedDBAPI,WebSQLAPI,localStorageAPI,cookieAPI. This method must be called after jSQL has loaded (ie, inside thejSQL.load() callback.

Example
jSQL.load(function(){    alert("jSQL is storing your data in: "+jSQL.getApi());});

Persistence Management

Storage APIs

Querying the Database

jSQLTable class

jSQLQuery interface

jSQLWhereClause class

jSQL Helper Methods

jSQL Syntax

Fun with DataTypes

Error Handling

Examples

License

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp