Socket
Socket
Sign inDemoInstall

@capacitor-community/sqlite

Package Overview
Dependencies
Maintainers
24
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/sqlite

Community plugin for native & electron SQLite databases


Version published
Weekly downloads
12K
decreased by-4.03%
Maintainers
24
Weekly downloads
Β 
Created
Source


SQLITE DATABASE

@capacitor-community/sqlite


CAPACITOR 3 🚧


Capacitor community plugin for Native and Electron SQLite Databases. In Native databases could be encrypted with SQLCipher



Maintainers

MaintainerGitHubSocial
QuΓ©au Jean Pierrejepiqueau

NEXT FOR CAPACITOR 3 🚧 (Master)

The refactor release has been upgraded to @capacitor/core@3.0.0-beta.1.

🚨 !!! ONLY iOS and Android plugins have been upgraded !!! 🚨

The test has been achieved on:

REFACTOR πŸš€ (Move to branch 2.9.x)

The refactor offers now (since 2.9.0-beta.1) all the features that the previous was offering. It has been a quite heavy process, hoping that the developpers will take benefit from it.

The main reasons for it:

  • multiple database connections
  • db connector allowing for easy commands db.open(), db.close, ...
  • improve the response time of the encrypted database by removing the internal open and close database for each sqlite query
  • moving to the latest androidx.sqlite.db.xxx
  • offering encryption for Electron platform by using @journeyapps/sqlcipher on MacOs, !!! NOT ON WINDOWS !!!
  • cleaning and aligning the code between platforms
  • allowing developers to develop typeorm or spatialite drivers.

This was discussed lengthly in issue#1 and issue#52

Refactor available for Android, iOS and Electron platforms.

The test has been achieved on:

Other frameworks will be tested later

  • Stencil

@INITIAL πŸ›‘ (Move to branch 2.4.x)

The 2.4.x is now πŸ›‘ NOT MAINTAINED ANYMORE πŸ›‘.

To install it

npm i --save @capacitor-community/sqlite@initial

The test has been achieved on:

Browser Support

The plugin follows the guidelines from the Capacitor Team,

meaning that it will not work in IE11 without additional JavaScript transformations, e.g. with Babel.

Installation

npm install @capacitor-community/sqlite@next
npm run build
npx cap sync
npx cap add android
npx cap add ios
// npx cap add @capacitor-community/electron not working

IOS

  • on iOS, no further steps needed.

Android

  • On Android, no further steps needed.

Electron 🚧 (NOT WORKING YET)

  • On Electron, go to the Electron folder of YOUR_APPLICATION
npm install --save @journeyapps/sqlcipher

Build & Run

npm run build
npx cap copy
npx cap copy @capacitor-community/electron

IOS

npx cap open ios

Android

npx cap open android

Electron 🚧 (NOT WORKING YET)

npx cap open @capacitor-community/electron

Issues

When you will find issues, please report them with the NEXT word at the start of the issue title.

issues

Configuration

No configuration required for this plugin

Supported methods

NameAndroidiOSElectron MacElectron WindowsWeb
createConnectionβœ…βœ…πŸš§πŸš§βŒ
closeConnectionβœ…βœ…πŸš§πŸš§βŒ
open (non-encrypted DB)βœ…βœ…πŸš§πŸš§βŒ
open (encrypted DB)βœ…βœ…πŸš§πŸš§βŒ
closeβœ…βœ…πŸš§πŸš§βŒ
executeβœ…βœ…πŸš§πŸš§βŒ
executeSetβœ…βœ…πŸš§πŸš§βŒ
runβœ…βœ…πŸš§πŸš§βŒ
queryβœ…βœ…πŸš§πŸš§βŒ
deleteDatabaseβœ…βœ…πŸš§πŸš§βŒ
importFromJsonβœ…βœ…πŸš§πŸš§βŒ
exportToJsonβœ…βœ…πŸš§πŸš§βŒ
createSyncTableβœ…βœ…πŸš§πŸš§βŒ
setSyncDateβœ…βœ…πŸš§πŸš§βŒ
getSyncDateβœ…βœ…πŸš§πŸš§βŒ
isJsonValidβœ…βœ…πŸš§πŸš§βŒ
isDBExistsβœ…βœ…πŸš§πŸš§βŒ
addUpgradeStatementβœ…βœ…πŸš§πŸš§βŒ
copyFromAssetsβœ…βœ…πŸš§πŸš§βŒ

Documentation

API

Framework's Usage

Applications demonstrating the use of the plugin

Ionic/Angular

Ionic/React (to come later)

Ionic/Vue (to come later)

Vue (to come later)

Usage

Dependencies

The IOS and Android codes are using SQLCipher allowing for database encryption The Electron code use @journeyapps/sqlcipher allowing for database encryption for MacOS 🚨 !!! NOT for Windows !!! 🚨

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Jean Pierre QuΓ©au

πŸ’»

Paul Antoine

πŸ’»

Karyfars

πŸ’»

Chriswep

πŸ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 30 Jan 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc