0

I am very new to the Titanium Alloy framework. I am creating a CRUD app. So I need a database. I created a sample.sqlite in app/asset folder using Mozilla Sqlite add on. Then I created a model given below. But after adding the records through the application, I am not able to see the records in db using Mozilla Addon. But in application the added records are showing.So I am confused that the appication is using the sample.sqlite file we created or some other file(s). Please rectify the point. If it uses other file(s) How can I see the database in Mozilla addon? I followed the link but unable to find the Window > Open Perspective > Other > DDMS option in Titanium Studio.

I am using Windows 7 and Genymotion Android Emulator

Here is the Model

exports.definition = {
    config: {
        columns: {
            "Id": "INTEGER",
            "Name": "TEXT",
            "Age": "INTEGER"

        },

        adapter: {
            type: "sql",
            collection_name: "sample",
            db_name: "sample",
        }
    },
    extendModel: function(Model) {
        _.extend(Model.prototype, {
            // extended functions and properties go he


        });

        return Model;
    },
    extendCollection: function(Collection) {
        _.extend(Collection.prototype, {
            // extended functions and properties go here
        });

        return Collection;
    }
};
Community
  • 1
  • 1
Kiren S
  • 3,037
  • 7
  • 41
  • 69
  • try this: http://stackoverflow.com/questions/20327740/pull-a-database-from-genymotion-emulator-on-to-local-disk or this: http://stackoverflow.com/questions/25180187/view-database-of-genymotion-emulator-in-ddms – phil Sep 29 '14 at 10:33

1 Answers1

0

You want to pull the data from db using Mozilla add on.

For that first you need to open the DDMS that you can find at android-sdk-win > tools > DDMS

Once there go File Explorer > Data > Data > package name > .sqlite file and save it

You can then use mozilla add on to connect to the .sqlite file.

AdrieanKhisbe
  • 3,899
  • 8
  • 37
  • 45