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

Persistence Management

Rob Parham edited this pageSep 25, 2017 ·10 revisions

jSQL databases are stored on the user's hard drive but are loaded into memory when jSQL is loaded. For query speed, all database operations are made in memory and are not saved to the user's hard drive untiljSQL.commit() is called.


jSQL.load(onLoadCallback)

Register a callback to be fired when the database has been loaded into memory and is ready to be queried.

Parameters
  • onLoadCallback: A function to be called when the database has been loaded.
Example
jSQL.load(function(){    jSQL.createTable('Users', ['Name', `Age`]).ifNotExists().execute();    var allUsers = jSQL.select('*').from('Users').execute().fetchAll('ASSOC');});

jSQL.commit()

Commit any changes made to the database from memory to the user's hard drive.

Example
jSQL.dropTable('Users');jSQL.commit();

jSQL.rollback()

Rollback any changes not yet committed.

Example
jSQL.dropTable('Users');jSQL.rollback();

jSQL.tables

An object containing ajSQLTable object for each of your tables. If you have a table calledmyTable, it is located injSQL.tables.myTable.


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