is that it does not support ID self-increment.PackagingEncapsulates the Websql create database, update, and query operations:qiao.h.db = function (name, size) { var db_name = name? Name: ' Db_test '; var db_size = size? Size:2; Return OpenDatabase (db_name, ' 1.0 ', ' db_test ', db_size * 1024 * 1024);}; Qiao.h.update = function (db, SQL) { if (db sql) db.transaction (function (TX) {tx.exec
Label:The common operation of the Websql is a package, the project is based on PhoneGap, but the PHONEGAP default has integrated the database operation plug-in, so no need to configure what, directly use can be:/*** Database Operation helper class, define object, data operation method are defined here */var dbname= ' mydb '; var version= ' 1.1 '; var dbdesc= ' mydb '; var table_picture= ' Be_ Picture '; var dbsize=30000;var db=null;/** * Open Database
Example of using Web SQL in HTML 5: websql
Web SQL simulates databases in a browser and can use JS to operate SQL to read and write data. However, this feature currently does not support many browsers, and its W3C specification has been discontinued, it seems that its prospects are not very clear.
W3C specification: http://www.w3.org/TR/webdatabase/#dom-sqltransaction-sync-executesql)
Supported browsers and
This article mainly introduces HTML5 Storage functions and webSQL related operations, including the use of Storage attributes and the use of JavaScript For webSQL operations, for more information, see html5. two mechanisms are introduced, similar to HTTP session cookies, to store structured data on the client and overcome the following Disadvantages.
Each HTTP request contains Cookies, causing the transmis
Recently in the Project Hybrid app development, the project has a large number of JS code running on Android devices. The use of a lot of HTML5 new features, have not encountered before, do not understand, here to record the knowledge of adding point front. In hybrid app development, it's often necessary to use caching features, such as when you enter data on a page form control, and you want to see it again the next time you exit the app, such as having the ability to save drafts in your projec
SQL statements can be more cumbersome to write, and we all miss the ORM tools in the Java language at this time.
Fortunately, the development community has never lacked creative developers, and many open source Web SQL ORM tools have emerged.
Persistence.js is a JavaScript framework that was originally designed to perform OR Mapping HTML Web SQL to facilitate rapid WEB SQL access by client developers.
Later, with the development of the framework, it began to gradually peel back the reliance
Label:HTML5 Web Storage Use HTML5 to store the user's browsing data locally. Earlier, local storage was using cookies. But Web storage needs to be more secure and fast. This data is not saved on the server, but it is used only for user requests for Web site data. It can also store large amounts of data without compromising the performance of the site. Data exists as a key/value pair, and the Web page's data is only allowed to be used by that page. background for local storage It is well known t
Tutorial 05-dishi and websql, hbuilderwebsqlDishi Introduction
Dishi is a planning app developed with HBuilder,
HBuilder, mui, nativejs, and h5 features are used.Expectation
Currently, it is only developed at the todolist level,
In the future, plans will be made into planning apps such as daily, monthly, and annual plans.URL
Official Website: http://uikoo9.com/dishi
Source: http://git.oschina.net/uikoo9/uikoo9-dishi
Tutorial
In the future, we will use
There are several ways to websql storage:OpenDatabase: This method uses an existing database or creates a new database to create a database object.Transaction: This method allows us to perform transaction processing;ExecuteSQL: This method is used to execute SQL statements;1 var db = OpenDatabase (name,version,displayname,estimatesize,creationcallback);Name: Names of databases;Version: The revision number of the database;DisplayName: Description of th
Label:Recently in writing Websql, every time in the browser console to execute SQL too laborious, and the brain is not good, always forget what the last initialized database, so wrote a very simple websql visualization tool, said the tool is a bit large, is to facilitate, today shared out, the need of classmates, Please take away, did not do too much logic judgment, have the question can reply me, I again t
Recently our app is not very good, because it is a problem, submit the function of the topic, before just from the app to submit the wrong problem to the server, the service side is the answer, check the right answer, return the result set, now a lot of users reflect, submission speed is very slow, many times, are submitted unsuccessful, so the leader let me put the topic , the task of verifying the problem is also given to the front end, the service side only accepts and stores the wrong proble
SELECT * from Table ORDER by ID DESC Limit 10,9Limit semantics: Skip 10 lines and take 9 rowsReference:SQLite limit Usage If I'm going to 11-20 of the Account table data Select * From account Limit 9 Offset 10; The above statement means getting data from the account table, skipping 10 rows, taking 9 rows well, I think this feature is enough for many web medium-sized websites to use this. You can also write a select * from the account limit10,9 with the same effect as above. General public beta:
become a framework that could support a variety of databases. (1) Introduction of Persistence.js Persistence.js divides its core modules into smaller JavaScript files, effectively guaranteeing high-performance loading, and users only need to introduce the appropriate JavaScript files when they use a function module. Here we use Persistence.js,persistence.store.sql.js and persistence.store.websql.js, these three files are required to use WEB SQL. Pers
Label:1. Create or open a database (OpenDatabase)var db = OpenDatabase (' dbname ', ' 1.0 ', ' discription ', 2 * 1024); Currently testing is only supported by Chrome browser Opendatabasek Five parameters are: database name, version number, description, database size, create callback function. The callback function is an optional parameter.2. Execute SQL statementsDb.transaction (function(TX) {Tx.executesql (' CREATE TABLE IF not EXISTS T1 (id unique, log) ', [],function(TX, result) {},function(
load of the time to download all resources, cache to the local, offline applications and browser cache is different, we can specify the content of the cache, you can also specify that those things need to read the database;d) HTML5 support for offline functions, when the first visit to access the server, and download a storage list, from the list to download the contents, stored in the specified location, when we clear the browser cache, it is not cl
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.