title: Ionic 3 SQLite: SQLiteObject's method executeSql() not working
body: <p>What I have done:</p>
  
  <ol>
  <li>Installed ionic today, by the command <code>npm install -g ionic</code> and saying 'y' to the cordova integration.</li>
  <li>Installed cordova: <code>npm install -g cordova</code></li>
  <li>Created a new project: <code>ionic start sqlite3demo blank</code></li>
  <li><p>Installed Ionic native storage:</p>
  
  <p><code>ionic cordova plugin add cordova-sqlite-storage</code></p>
  
  <p><code>npm install --save @ionic-native/sqlite</code></p></li>
  </ol>
  
  <p>Now for the code. I imported <code>SQLite</code> into <code>app.module.ts</code> like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { BrowserModule } from '@angular/platform-browser';
  import { ErrorHandler, NgModule } from '@angular/core';
  import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
  import { SplashScreen } from '@ionic-native/splash-screen';
  import { StatusBar } from '@ionic-native/status-bar';
  import { SQLite } from '@ionic-native/sqlite';
  
  import { MyApp } from './app.component';
  import { HomePage } from '../pages/home/home';
  
  @NgModule({
    declarations: [
      MyApp,
      HomePage
    ],
    imports: [
      BrowserModule,
      IonicModule.forRoot(MyApp)
    ],
    bootstrap: [IonicApp],
    entryComponents: [
      MyApp,
      HomePage
    ],
    providers: [
      StatusBar,
      SplashScreen,
      {provide: ErrorHandler, useClass: IonicErrorHandler},
      SQLite
    ]
  })
  export class AppModule {}
  </code></pre>
  
  <p>And then, I modified the default home page like this:</p>
  
  <pre><code>&lt;ion-header&gt;
    &lt;ion-navbar&gt;
      &lt;ion-title&gt;
        SQLite demo
      &lt;/ion-title&gt;
    &lt;/ion-navbar&gt;
  &lt;/ion-header&gt;
  
  &lt;ion-content padding&gt;
    &lt;ion-content&gt;
  
      &lt;button ion-button (click)="createTables()"&gt;Create db&lt;/button&gt;
      &lt;p&gt;Result: {{ message }}&lt;/p&gt;
  
    &lt;/ion-content&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>And finally, I modified <code>home.ts</code> like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>import { Component } from '@angular/core';
  import { NavController, Platform } from 'ionic-angular';
  import { SQLite, SQLiteObject } from '@ionic-native/sqlite';
  
  @Component({
    selector: 'page-home',
    templateUrl: 'home.html'
  })
  export class HomePage {
  
    message = '';
    db: SQLiteObject;
  
    constructor(private platform: Platform, public navCtrl: NavController, private sqlite: SQLite) {
      this.platform.ready().then(() =&gt; {
        this.sqlite.create({
          name: 'todos.db',
          location: 'default'
        })
          .then((db: SQLiteObject) =&gt; {
            this.message = JSON.stringify(db);
            this.db = db;
          });
      });
    }
  
    public createTables() {
      return this.db.executeSql(
        `CREATE TABLE IF NOT EXISTS list (
          id INTEGER PRIMARY KEY AUTOINCREMENT,
          name TEXT
        );`)
        .then(() =&gt; this.message = 'OK')
        .catch((err) =&gt; this.message = "error detected creating tables -&gt; " + JSON.stringify(err));
    }
  
  }
  </code></pre>
  
  <p>After all that, I execute <code>ionic cordova run android</code>, and I can see the JSON from <code>db</code>, but after that, I click the button to create a table and instead of seeing 'OK', I see the JSON from the error.</p>
  
  <p><a href="https://i.stack.imgur.com/6m1FC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6m1FC.png" alt="Start"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Hs3Wv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hs3Wv.png" alt="After pressing the button"></a></p>
  
  <p>What did I do wrong? Why isn't it working?</p>
  
  <p><strong>EDIT:</strong> The versions I'm using are:</p>
  
  <pre><code>"@ionic-native/sqlite": "^4.12.2",
  "cordova-sqlite-storage": "^2.4.0"
  </code></pre>