Socket
Socket
Sign inDemoInstall

@nativescript-community/sqlite

Package Overview
Dependencies
1
Maintainers
19
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nativescript-community/sqlite

SQLite for Nativescript


Version published
Weekly downloads
878
increased by15.68%
Maintainers
19
Created
Weekly downloads
 

Changelog

Source

3.5.0 (2024-01-03)

Bug Fixes

  • ios: transaction fix (187bd04)

Features

  • typeorm: update driver to work with latest typeorm version (ee32114)

Readme

Source

@nativescript-community/sqlite

Downloads per month NPM Version

SQLite for Nativescript


Table of Contents

Installation

Run the following command from the root of your project:

ns plugin add @nativescript-community/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-community/sqlite";

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

Platforms sqlite versions

Keywords

FAQs

Last updated on 03 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc