title: sqlite query not executing on react native
body: <p>I need to fetch data from the table 'pet'.
  The database and the table are existing one.When executing this code getting this.state.petname as 'def'.</p>
  
  <pre><code>var SQLite = require('react-native-sqlite-storage')
  var db = SQLite.openDatabase({name:'test.db',createFromLocation:'~sample.db'})
  class Register extends Component {
  
    constructor(props){
      super(props);
      this.state={
        petname: "abc",
      };
      db.transaction((tx) =&gt; {
                    this.setState({petname:"def"});
  
          tx.executeSql('SELECT petname FROM pet WHERE owner = ?',['Mary'],(tx, results) =&gt; {
          this.setState({petname:"klm"});
          var len = results.rows.length;
          if(len &gt; 0){
            var row = results.rows.item(0);
            this.setState({petname:row.petname});
          }
          else{
              this.setState({petname:"hij"});
           }
  
        });
      });
    }
    ............
          }
  </code></pre>