diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-18 02:41:39 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-18 02:41:39 (GMT) |
commit | 7eb051d82a5bd35f86b5f692e2da5ea133e6b7b0 (patch) | |
tree | 369b768bf485b43072808e9736e3f8bee739be64 /doc | |
parent | 7c400a77dfbc3f45cb7626962b6e055d582f4cba (diff) | |
download | Qt-7eb051d82a5bd35f86b5f692e2da5ea133e6b7b0.zip Qt-7eb051d82a5bd35f86b5f692e2da5ea133e6b7b0.tar.gz Qt-7eb051d82a5bd35f86b5f692e2da5ea133e6b7b0.tar.bz2 |
Update SQL database support to current HTML5 specification.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index dc08c28..6d9d1f2 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -220,25 +220,13 @@ provide the ability to access local offline storage in an SQL database. These databases are user-specific and QML-specific. They are stored in the \c Databases subdirectory of QmlEngine::offlineStoragePath(), currently as SQLite databases. -The API is based on the HTML5 offline storage SQL draft API. The main difference is that this QML -API is currently synchronous. You should avoid relying on synchronicity to make your scripts more -portable, both to/from HTML5 and to future QML versions. +The API conforms to the Synchronous API of the HTML5 Web Database API, +\link http://www.w3.org/TR/2009/WD-webdatabase-20091029/ W3C Working Draft 29 October 2009\endlink. The API can be used from JavaScript functions in your QML: \quotefile declarative/sql/hello.qml -\section2 DbObject openDatabase(string name, string version, string description, int estimatedsize) - -Opens a database identified by the given \c name and \c version. -If a database with this name and version does not exist, it is created. The \c version should -always be "1.0" until schema upgrade semantics are defined. - -The \c description and \c estimatedsize are provided to allow application tools to give the user -control over the databases created, but are otherwise not used by QML. - -The returned DbObject has a \c transaction() method by which SQL transactions can be done. - When a database is first created, an INI file is also created specifying its characteristics: \table @@ -247,21 +235,9 @@ When a database is first created, an INI file is also created specifying its cha \row \o Version \o The version of the database passed to \c openDatabase() \row \o Description \o The description of the database passed to \c openDatabase() \row \o EstimatedSize \o The estimated size of the database passed to \c openDatabase() -\row \o DbType \o Currently "QSQLITE" +\row \o Driver \o Currently "QSQLITE" \endtable This data can be used by application tools. - -\section2 void DbObject::transaction(function usesql(DbTxObject), function errorcb=0, function successcb=0) - -Executes \c usesql() in a database transaction. The \c DbTxObject object has a \c executeSql() method by which the -code of \c usesql can execute SQL. The optional second and third arguments are an error callback and success -callback respectively (note that the order of these is the opposite to DbTxObject::executeSql()). - -\section2 void DbTxObject::executeSql(string sql, function successcb=0, function errorcb=0) - -Executes \c sql as an SQL block. The optional second and third arguments are a success callback and error -callback respectively (note that the order of these is the opposite to DbObject::transaction()). - */ |