How to find Couchbase Mobile DB file in iOS? - ios

I want to find Couchbase Mobile DB file location in iOS and please also describe how to open db file?
Thanks

If you are using CBM 1.4 or earlier, you can locate the location of the cblite2 db file as discussed here
https://developer.couchbase.com/documentation/mobile/1.4/guides/couchbase-lite/native-api/manager/index.html#dude-wheres-my-database-file
To view the database , you can use CouchbaseLiteViewer which is (not officially supported ) Mac application
https://github.com/couchbaselabs/CouchbaseLiteViewer.
You could also use any sqlite browser such as http://sqlitebrowser.org to browse the sqlite content

CouchbaseLiteViewer is not updated for checking data in Cblite 2.0 , i
waiting for it so as of now following way check Cblite db data and it
will work.
Latest solution Couchbase 2.0 db check:
There is a command line tool which I believe is inside the zip file that you download to get Couchbase Lite (look in tools) called "cblite" which is similar to the sqlite command line tool. It can perform operations on a database such as listing documents, querying, etc.
Download Couchbase sdk from the website
It comes with the folder inside this, there is a folder called Tools .
Screenshots for reference :
3.Inside tools cblite is there , just launch it . now suppose i have cblite db .
Use following way to query and this tools provide you comannd terminal way to search data/document :
I tried this and it works 👍
shobhakar$ ./cblite /Downloads/mobile-travel-sample-master/ios/TravelSample/TravelSample/prebuilt/travel-sample.cblite2
Opened database /Downloads/mobile-travel-sample-master/ios/TravelSample/TravelSample/prebuilt/travel-sample.cblite2/
This is the current solution and this is awesome.
Reference link : https://github.com/couchbase/couchbase-lite-ios/issues/2176#issuecomment-423921463

Related

How can I upload database data to Neo4j?

Using an pan-genome building tool I've ended with a database in an unfamiliar format to me which in theory should be explorable by the Neo4j browser.
Nevertheless I can't seem to find any way to achieve so and any mention on how to do it in any bibliography besides the instructions of the manual provided by the author of said tool.
I've tried to do this using Neo4j community edition server (v. 3.5.3) with the example file same as the instructions suggest but it just doesn't seem to detect the database showing only the default one.
The mentioned part of the tutorial can be found here: https://www.bioinformatics.nl/pangenomics/manual/tutorial_part3/
So, copy the database content to the neo4j data folder. Once you have that, open the neo4j.conf file and set the following configuration:
dbms.default_database=chloroplast_DB
I am not exactly sure that is the database name, use the same name as is the database folder and then start the database.

pgadmin 4: Exporting .tar file

I am trying to use pgAdmin 4 on my personal laptop (Windows operating system with PostgreSQL 9.6) to export a database as a .tar file. I had issues importing csv through the Import/Export tool as well, and could only import successfully when doing the following:
COPY public.build_info FROM 'C:\time_table.csv' CSV HEADER;
I have read a few questions that resort to backing up a database through the command line, but I am hoping to complete this within pgAdmin4.
My current steps are:
right click my database (in this case Housing_DB)
Choose my directory to save (same place the csv files were imported from)
Add additional information (encoding, file type, name, etc.)
I get an error immediately connected to Permissions, but have struggled to determine how to fix this issue:
Does anybody know how I could go through and provide permissions to be able to back up this database? I have looked at the documentation pertaining to backup/restore but did not see anything covering permissions (https://www.pgadmin.org/docs4/1.x/backup_dialog.html).
It looks like your C:\ is protected by administrator account which can't be written by user postgres. Can you try again with locations like your 'Desktop' or 'Temp' folder.

sqlite database manager for iOS

I use this https://github.com/sanathp/DatabaseManager_For_Android sqlite manager for my android project which helps me a lot. It's a single class file that enabled me to see my database tables. So I didn't had to work blindly. I could see my database when I'm running the app on device with this manager. Is there any sqlite database manager library for iOS similar to this? I'm using swift for my project & for sqlite database I'm using Sqlite.swift project. Thanks.
Though in android you have it as a activity i kind of have a separate mac app call SqliteBrowser by which i will manage the data
Check it here: http://sqlitebrowser.org/
I would locate the sqlite file in the documents directory(Or location where you store your sqlite file) and will load the sqlite file in this manager
To check the data is inserted correctly
To insert data and check whether i can retrieve via code
The tables inserted into the DB are correct
also you can use sqdatabase sqlite database manager ı made this application for check database you can insert update browse and delete or only check your datas easy to use
link corrected sory you can check from here

Unable to open sql store file used in iOS application

I am using a sql based database in one of my application with Core Data framework. I have not enabled any file protection for persistent store (using NSFileProtectionKey). But I am unable to open my database file store in a directory under 'Caches' folder in Library.
Have you ever come across such an issue. Below is the image I am getting when I try to open the sql file. However, a difference from iOS 6 I could see in that folder is there are two additional files (-shm and -wal) present with the same name of the sql store file.
Could anyone please help me to find a solution to open the file.
The -shm and -wal are journal files created using write-ahead logging. You need all 3 files for a complete database. I haven't seen an encryption error falsely triggered by not obeying this rule, but it doesn't seem out of the question.
See https://developer.apple.com/library/mac/qa/qa1809/_index.html and http://asciiwwdc.com/2013/sessions/207.

How to connect sqlite with an online database on Phonegap

I made a database using phonegap[cordova 1.7.0] sqlite on IOS5.
But I now want to switch this database with one that I already have on an online server.
Is there some method to do that ?
Thanks a lot.
If I understood correctly you want to use your current logic for handling database access to connect to remote sqlite database.
I think such use case is not possible out of the box. Cordova is using support for WebSQL built into iOS and Android (or provides own compatible implementation).
There are at least 2 solutions to your problem:
Create service which allows access to your remote database, and then create client side sync service which synchronizes that on the client and server. This way you will have full offline support plus data will be backed up on the server.
Write your own Cordova plugin which allows access to remote sqlite databases but uses WebSQL interface. I guess you could reuse most of the current logic from iOS WebSQL implementation, but instead of accessing local sqlite file on the device, use the database on the server.
Write a server side application that provides access to the database.
There's an sqlite plugin for Phonegap. If the online sqlite is (semi-)publicly available/downloadable, you could have the Phonegap download the db file (there's a Download plugin, I think), and have your customized sqlite plugin use this db.
Either you can also do it in this way. Create a XML file dbase on server and parse it then you can make changes to your existing database by reading the xml files contents.

Resources