Using SQLite database on cocos2d-js for Android and iOS devices

Hello guys,

I am working on a game using Cocos2d JS. Which I will port to Android and iOS devices.
I have a database with around 5000 records.
How to use SQLite local database to manipulate(database operations) these records using cocos2d-js.
I searched on google and the forums but can not find any information or tutorial.
Any help or ideas?
Thank you.

You could implement the code in java android in the project that it is in frameworks/runtime-src/proj.android and then invoke the function from javascript this way: http://www.cocos2d-x.org/wiki/Invoking_Android_Java_methods_from_JavaScript

Thank You.
Its valuable for me. Any tutorial regarding this concepts will be a great help.
In my project folder there is no such folder frameworks/runtime-src/proj.android .
I have attach a image of my project folder.

I think you can add them doing right click in your project in the cocos code ide -> cocos tools -> add natives code support

P.D: After that I have this android project and I had to add the cocos library to create apks. (Import the cocos project in the cocos2d-x sdk in a folder called platform or something like that) If you need more indications let me know and i’ll explain more accurately.

P.D2: I think local storage it would insufficient for you but you could try it too.

I think you may try to use Cocos2d-JS cc.sys.localStorage.
It should be a SQLite storage.

Try to read your database and save it to cc.sys.localStorage.

cc.sys.localStorage.setItem(key, value);
cc.sys.localStorage.getItem(key);
cc.sys.localStorage.removeItem(key);

Thank You,
How can I add SqliteAssetHelperLib ?
https://github.com/jgilfelt/android-sqlite-asset-helper