My main goal is to import a database into a flutter app using sqlite(sqlflite plugin), instead of having to hard code all of the create tables into the apps code.
*I want the information to be accessed to the phone locally(access data from phone on airplane mode) that is why i am using sqlite
I am having trouble finding information on this online and was seeing if anyone had experience in doing this or has documentation/examples that could help.
i think you are looking for this :
Open an asset database in this case you must have the database already and you don't need to create tables
Flutter supports an open source module SQFlite. SQFlite is a way of storing app data in Flutter Application. SQFlite is a Database plugin for flutter. It is highly reliable and embedded Database engine. All the CRUD operation in the database will run on a background thread. You can see a simple example of this here.
Related
I have developed one application in ionic for offline mode. I have used sqlite database to store the data. Now i want to create a browser build. But sqlite is not supported in browser. Is there any way to use sqlite in browser?
Or else is there any database which works same as sqlite for browser.(kindly do not suggest websql database and pouchdb)
i am using pouchdb for now, but there is lots of redevelopment because queries in pouchdb and sqlite are very different
As of this moment there is no way of using SQLite with ionic in the browser. Did you maybe find a solution to your own problem?
For anyone reading this that wants to purely use SQLite in their app (instead of localstorage) you can use a livereload build on a test device and easily debug and test your code this way. Just connect dev tools and see all the console messages.
I’m new to ionic and in my Ionic Application, I need to store a pdf and image file in SQLite i.e in the app storage and should open within app. I will get the file from another database like MongoDB in the URL format. Could anyone of you help me out of this and suggest any references to complete the app storage using SQLite.
Thanks in advance.
I have researched on different aspects but could not find any.
Actually i'm new to hybrid app and i'm trying to make simple app using ionic with sqlite and i use google chrome console to log the app.
The question how can i manage/edit sqlite database?
Thank you.
A lot of the functionality you would see in a native app can be invoked using cordova tools.
http://ngcordova.com/docs/plugins/sqlite/
Try this plugin for a sqlite DB.
For temporary storage, you can use the localStorage of the browser.
Edit: I'm afraid I misread the question. To manage the DB as you would in phpmyadmin, you can use command line or a GUI.
https://www.sqlite.org/cli.html
I have used this GUI before
http://sqliteadmin.orbmu2k.de/
I'm using flask on appfog.com to make a personal blog. Today I tried to use sqlite. I can run the application locally with sqlite but when I update the app to AppFog, it does not seem to work. I can't find how to use sqlite in AppFog's docs. Can anyone tell me?
Thanks...
Sorry for my poor english:-)
It's not recommended to use sqlite for your production apps on AppFog because the file storage is ephemeral. Every time you update your app the database will get blown away. You're better off creating and binding a postgres, mysql, or mongodb database service for your app. You can continue to use sqlite db locally but your production app will use the bound service.
See the Bind Service section of: https://docs.appfog.com/languages/python/flask
I can create a sqlite DB in phonegap/html5 via window.openDatabase. I am going to have a large amount of data, so I want to ship it with the app.
So can I store a sqlite DB somewhere, within the app (It needs to work on both iOS and Android). I particular where is the shortName.db stored when I call
var db = openDatabase(shortName, version, displayName, maxSize);
And can I pre-populate this sqlite file. (In the phonegap environment)
Listed here are some solutions for iphone and android:
http://groups.google.com/group/phonegap/browse_thread/thread/5e57a728dc66a2a1?pli=1
I've not used PhoneGap, only created HTML5 apps that use Web SQL. However, if you're asking whether you can ship an app with a pre-populated SQLite database, then yes you can. Probably the simplest approach would be to provide the table creation scripts as part of the app. When it's first fired up, you can have the scripts run, and your database will then be fully initialised.
An alternative approach for deploying bulk data I came up is simply serialize it into text files and deploy the files together with the app.
You can use the File API provided by PhoneGap to load these files as strings, and parse them with Ext.util.JSON.decode().
Finally, use the MemoryProxy to integrate the decoded data with the rest of Sencha Touch and you are golden.