Wondering what’s next for npm?Check out our public roadmap! »

    cordova-sqlite-devtools

    1.2.1 • Public • Published

    NPM Version CI Dependency Status Dev Dependency Status

    Cordova SQLite Devtools

    A quick and easy way to pull a backup of a sqlite database from a connected Android device.

    Installation

    npm install -g cordova-sqlite-devtools
    

    Usage

    cordova-sqlite-devtools uses Android Debug Bridge (adb) to communicate with your Android device. Make sure you have adb installed / configured, and you have connected your mobile phone to your laptop / desktop.

    csd --help
    

    List Databases

    List all databases on the device.

    csd list
    

    Pull Database Backup

    With the below command, you should be able to find the database copied into the _sqlite-backups folder of the current directory. Use SQLite browser to open the database and browse the data.

    csd pull awesome.db
    

    Where awesome.db is the optional name of the database to backup. Note: the database name is case sensitive. If the database is not provided, you will be prompted to select from a list of available databases on the device.

    Delete Database Backups

    Remove _sqlite-backups folder and all backups.

    csd clean
    

    Generate

    Combine all SQL files into a JavaScript file that adds all SQL queries to an object on the window (window._sqlite). The generated file can be included (<script src="build/sqlite.js"></script>) and the queries accessed from code. For example, if your SQL file is named MyAwesomeQuery.sql, then you can access the query via window._sqlite['MyAwesomeQuery'].

    csd generate
    

    Options

    Name Alias Description Default
    --src -s Source glob of sql files. src/sqlite/**/*.sql
    --dest -d Destination JavaScript file. www/build/sqlite.js

    Development

    For easy development, clone the repo and run the following commands in the cordova-sqlite-devtools directory:

    npm install
    npm link
    npm run build

    Install

    npm i cordova-sqlite-devtools

    DownloadsWeekly Downloads

    25

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    26.1 kB

    Total Files

    17

    Last publish

    Collaborators

    • avatar