title: Phonegap - Sqlite Questions
body: <p>I use: cordova-sqlite-storage 2.0.3 "Cordova sqlite storage plugin" in my Phonegap App for Android.</p>
  
  <p>And I have some questions.</p>
  
  <pre><code>db.transaction(
  function(tx){
  
              // 1 QUERY - Empty Set
              tx.executeSql('SELECT * FROM table1', [],
                  // Success Callback
                  function(transaction, result) {
  
                  },
                  // Error Callback
                  function(error){
  
                  }
              );
  
              // 2 QUERY - Insert 10 records in my table
              for(i = 0; i &lt; 10; i++){
                  tx.executeSql('INSERT INTO table1 (id, data) VALUES (?, ?)', ['id' + i, 'data' + i],
                      // Success Callback
                      function(transaction, result) {
  
                      },
                      // Error Callback
                      function(error){
  
                      }
                  );
              }
  
              // 3 QUERY - 10 rows in Set
              tx.executeSql('SELECT * FROM table1', [],
                  // Success Callback
                  function(transaction, result) {
  
                  },
                  // Error Callback
                  function(error){
  
                  }
              );
  
          },
          // Error callback
          function(error){
  
          },
          // Success callback
          function(){
  
          }
      );
  </code></pre>
  
  <p>I have 12 queries in my transaction.</p>
  
  <p>1 QUERY - Empty Set</p>
  
  <p>2 QUERY - Insert 10 records in my table</p>
  
  <p>3 QUERY - 10 rows in Set</p>
  
  <p><strong>1. Will my 12 queries executed consistently ?</strong></p>
  
  <p>1 query -> 10 insert queries in loop -> 3 query</p>
  
  <p><strong>2. If i'll get error in second step in my loop, or may be i add 13 insert query at the end and get error in 13 query. Will all my changes inside transaction ROLLBACK ?</strong> </p>
  
  <p><strong>3. Whats happened if my db transaction will be in progress and i push HOME button and hide application ? Will my transaction finished in background ? Or may be it's stopped ?</strong></p>
  
  <p>Thank's for advance!</p>