davidmartos96 / sqflite_sqlcipher

SQLite flutter plugin
BSD 2-Clause "Simplified" License
96 stars 41 forks source link

How can I use alongside an ORM? #39

Open daybson opened 3 years ago

daybson commented 3 years ago

Hi, I use this package in production for 1 year.

I was looking for some orm compatible with sqflite, but I don't know how could I make it works along sqlcipher.

Do you have any idea to help me?

Thank you!

davidmartos96 commented 3 years ago

I've been using Moor for quite some time already and it is great. It supports encryption, which uses this library under the hood.

There are other ORMs for Sqlite but I haven't tried them out.

Abhijit-Revamp commented 3 years ago

I have been using this with "sqfEntity" plugin and works great. for my apps, MOOR is like cutting the butter by sword.

daybson commented 3 years ago

sqfEntity

Could you give an example of how you do you open your encripted database using the orm?

Abhijit-Revamp commented 3 years ago

@daybson --> I used sqfEntity, added "sqflite_sqlcipher" to pubspec (as documented here) and it just worked. Just had to specify the password why creating database model (as per sqfenity documentation)