Skip to content

Repository files navigation

Nativescript: MtMobile Sqlite

Build Statusnpm version

Installation

tns plugin add nativescript-mtmobile-sqlite

Usage

You should take care of wrapping sqlite calls to your preferred async option (promises, observables, async/await). And catch any exceptions thrown.

import{openOrCreate,deleteDatabase}from"nativescript-mtmobile-sqlite";constsqlite=openOrCreate("path/to/db");sqlite.execute("CREATE TABLE names (id INT, name TEXT)");sqlite.transaction(cancelTransaction=>{// Calling cancelTransaction will rollback all changes made to dbnames.forEach((name,id)=>sqlite.execute("INSERT INTO names (id, name) VALUES (?, ?)",[id,name]));});

About

SQLite for Nativescript

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages