ionic-orm icon indicating copy to clipboard operation
ionic-orm copied to clipboard

Ionic Native SQLite Driver Implementation

Open keyurpatel1980 opened this issue 9 years ago • 6 comments

I could not use sqlite driver when installed on my machine using npm. Actually, under drivers folder only websql folder is present. Can you please help me use sqlite driver for my ionic 2 project?

Keyur

keyurpatel1980 avatar Oct 27 '16 10:10 keyurpatel1980

Currently this does not yet have SQLite supported... This is currently in active development and should be pushed out in a few days.

Thanks.

BradyNadeau avatar Oct 31 '16 20:10 BradyNadeau

Great job @BradyLiles! Maybe a simple solution is integrate with ionic-storage and Ionic Native SQLite. What do you think?

mfdeveloper avatar Oct 31 '16 21:10 mfdeveloper

That's exactly what is planned @mfdeveloper. Integrating with Ionic Native SQLite will be done soon.. Ionic-Storage seems to be more of a key-value pair storage.. not much of a database and I don't foresee how it could really work in this type solution..

Right now WebSQL is currently supported and should work just fine in a the browser. Getting SQLite supported is not too much work. There are many similarities between WebSQL and SQLite but some very key differences as well. WebSQL does not support PRAGMA, BEGIN TRANSACTION, ROLLBACK, ENDTRANSACTION, etc which should be supported in the SQLite instance..

I'm having the issue right now as well where I need to start getting this up on the mobile device for a project of mine so this will be done here very shortly.

BradyNadeau avatar Nov 01 '16 14:11 BradyNadeau

Awesone @BradyLiles! I'm doing a offline POC version of my app, that use one of these options to local storage (WebSQL, SQLite...) and sync with a remote server REST API when the app is online again!

I will check this repo and the future implementations that you mentioned. Thank you so much for your attention 😄

mfdeveloper avatar Nov 02 '16 20:11 mfdeveloper

Any news on Ionic Native SQLite support?! WebSQL is working fine but only on Android and Browser... need support for Windows 10 and iOS aswell :/

digaus avatar Mar 08 '17 11:03 digaus

@BradyLiles could you post your changes in this repo as pull-request to typeorm - pleerock is looking forward to these changes getting merged (https://github.com/typeorm/typeorm/issues/62#issuecomment-262148315) and the community can extend your excellent work - e.g. I too want to add SQLite support to ionic

mobidev111 avatar Jun 16 '17 11:06 mobidev111