Sqlite storage.query how to use?

Hi,
I’m developing an ionic 2 app, i need to create a local database, i’m usin sqlite they allways return an error object.
Here is my code, thanks in advance to anyone who can help:

this.storage = new Storage(SqlStorage, {name:‘tfc’});
this.storage.query(‘insert into logins(name, password) values("’+ data.user +’", “’+ data.password +’”)’)
.then(res => alert(‘resultado:’ + res))
.catch(error => alert(‘error:’ + error))

See if below link is useful, I followed this tutorial to implement SqlStorage

Also, there are getter and setter which are also useful, if you like source code, below is source code of SqlStorage

1 Like

Thankyou, it works :slight_smile: