alfabc
#1
I see that ionic 2 handle sql/local storage problem with its own API. It is so good.
I want to ask that SqlStorage API how to handle transactional aueries?
let storage = new Storage(SqlStorage);
storage.query(“CREATE TABLE hede…”)
storage.query(‘insert into hede…’);
storage.query(‘insert into hede…’);
storage.query(‘insert into hede…’);
…
is this runs transactional? Or how to achieve this?
What about insert multiple values by one query?
alfabc
#3
Actually I realise that this API only support INSERT, UPDATE, DELETE fro the documentation. I guess all the way this API not enough for PRODUCTION:
- Create table,
- Drop table
- INSERT, UPDATE, DELETE queries
- and of course transaction ability required.
Instead of this i have to use https://github.com/driftyco/ionic-native i guess.
How? Could you please give an example ?
INSERT INTO mytable (col1, col2, col3) VALUES
(1, 2, "abc"),
(2, 4, "xyz"),
(3, 5, "aaa"),
(4, 7, "bbb");