You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2013/02/20 21:17:24 UTC

[2/2] docs commit: Convert tabs to space in sqlresult document.

Updated Branches:
  refs/heads/master 0df12ddab -> 74ce4224f


Convert tabs to space in sqlresult document.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/74ce4224
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/74ce4224
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/74ce4224

Branch: refs/heads/master
Commit: 74ce4224f1d7056b2f9bc79e5e4a0db8c8d980e7
Parents: 50c5392
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Wed Feb 20 12:12:33 2013 -0800
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Wed Feb 20 12:16:48 2013 -0800

----------------------------------------------------------------------
 .../cordova/storage/sqlresultset/sqlresultset.md   |  138 +++++++-------
 1 files changed, 69 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/74ce4224/docs/en/edge/cordova/storage/sqlresultset/sqlresultset.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/storage/sqlresultset/sqlresultset.md b/docs/en/edge/cordova/storage/sqlresultset/sqlresultset.md
index 68562d1..2ffcdac 100644
--- a/docs/en/edge/cordova/storage/sqlresultset/sqlresultset.md
+++ b/docs/en/edge/cordova/storage/sqlresultset/sqlresultset.md
@@ -46,27 +46,27 @@ Supported Platforms
 Execute SQL Quick Example
 ------------------
 
-	function queryDB(tx) {
-		tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
-	}
-
-	function querySuccess(tx, results) {
-		console.log("Returned rows = " + results.rows.length);
-		// this will be true since it was a select statement and so rowsAffected was 0
-		if (!results.rowsAffected) {
-			console.log('No rows affected!');
-			return false;
-		}
-		// for an insert statement, this property will return the ID of the last inserted row
-		console.log("Last inserted row ID = " + results.insertId);
-	}
-	
-	function errorCB(err) {
-		alert("Error processing SQL: "+err.code);
-	}
-	
-	var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-	db.transaction(queryDB, errorCB);
+    function queryDB(tx) {
+        tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
+    }
+
+    function querySuccess(tx, results) {
+        console.log("Returned rows = " + results.rows.length);
+        // this will be true since it was a select statement and so rowsAffected was 0
+        if (!results.rowsAffected) {
+            console.log('No rows affected!');
+            return false;
+        }
+        // for an insert statement, this property will return the ID of the last inserted row
+        console.log("Last inserted row ID = " + results.insertId);
+    }
+
+    function errorCB(err) {
+        alert("Error processing SQL: "+err.code);
+    }
+
+    var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
+    db.transaction(queryDB, errorCB);
 
 Full Example
 ------------
@@ -83,54 +83,54 @@ Full Example
         //
         document.addEventListener("deviceready", onDeviceReady, false);
 
-		// Populate the database 
-		//
-		function populateDB(tx) {
-			tx.executeSql('DROP TABLE IF EXISTS DEMO');
-			tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
-			tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
-			tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
-		}
-
-		// Query the database
-		//
-		function queryDB(tx) {
-			tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
-		}
-
-		// Query the success callback
-		//
-		function querySuccess(tx, results) {
-      console.log("Returned rows = " + results.rows.length);
-      // this will be true since it was a select statement and so rowsAffected was 0
-      if (!results.rowsAffected) {
-        console.log('No rows affected!');
-        return false;
-      }
-      // for an insert statement, this property will return the ID of the last inserted row
-      console.log("Last inserted row ID = " + results.insertId);
-		}
-
-		// Transaction error callback
-		//
-		function errorCB(err) {
-			console.log("Error processing SQL: "+err.code);
-		}
-
-		// Transaction success callback
-		//
-		function successCB() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(queryDB, errorCB);
-		}
-
-		// Cordova is ready
-		//
-		function onDeviceReady() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(populateDB, errorCB, successCB);
-		}
-	
+        // Populate the database 
+        //
+        function populateDB(tx) {
+            tx.executeSql('DROP TABLE IF EXISTS DEMO');
+            tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
+            tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
+            tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
+        }
+
+        // Query the database
+        //
+        function queryDB(tx) {
+            tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
+        }
+
+        // Query the success callback
+        //
+        function querySuccess(tx, results) {
+            console.log("Returned rows = " + results.rows.length);
+            // this will be true since it was a select statement and so rowsAffected was 0
+            if (!results.rowsAffected) {
+                console.log('No rows affected!');
+                return false;
+            }
+            // for an insert statement, this property will return the ID of the last inserted row
+            console.log("Last inserted row ID = " + results.insertId);
+        }
+
+        // Transaction error callback
+        //
+        function errorCB(err) {
+            console.log("Error processing SQL: "+err.code);
+        }
+
+        // Transaction success callback
+        //
+        function successCB() {
+            var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
+            db.transaction(queryDB, errorCB);
+        }
+
+        // Cordova is ready
+        //
+        function onDeviceReady() {
+            var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
+            db.transaction(populateDB, errorCB, successCB);
+        }
+
         </script>
       </head>
       <body>