Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@capacitor-community/sqlite
Advanced tools
@capacitor-community/sqlite
CAPACITOR 3
Capacitor community plugin for Native and Electron SQLite Databases. In Native databases could be encrypted with SQLCipher
Maintainer | GitHub | Social |
---|---|---|
Quéau Jean Pierre | jepiqueau |
🚨 Since release 3.2.0-5 ->> 🚨
The Web plugin is now implemented based on the stencil companion jeep-sqlite@0.0.7
which is using sql.js@1.5.0
for database queries and localeforage@1.9.0
for database persistency.
🚨 Since release 3.2.0-3 ->> 🚨
The Electron plugin is now based on @capacitor-community/electron@4.0.3
thanks to the hard and heavy work from Mike Summerfeldt IT-MikeS
👏 🙏
🚨 Since release 3.2.0-2 ->> 🚨 🚨 !!! for Electron developper, the Electron plugin is back !!! 🚨
Based on sqlite3
, so without encryption
The two listeners sqliteImportProgressEvent
and sqliteExportProgressEvent
are not available.
🚨 Since release 3.1.2 ->> 🚨
Thanks to Nirajhinge and Chris, an example of using the TypeORM driver in a Ionic/Vue app has been developed see https://github.com/jepiqueau/vue-typeorm-app
.
🚨 Since release 3.0.0-rc.2 ->> 🚨
Thanks to Chris, a driver to TypeORM is now available
🚨 Since release 3.0.0-beta.13 ->> 🚨
GlobalSQLite secret
and newsecret
are deprecated
The user can now set its own secure secret (passphrase)
use setEncryptionSecret
ONCE to migrate encrypted databases
from secret
to secure stored secret
use changeEncryptionSecret
to change your secure stored secret
iOS used KeyChain service
to store the secret
Android used Encrypted SharedPreferences
to store the secret
,
the minimun sdk should be set to 23 (limitation from Google)
🚨 Since release 3.0.0-beta.13 ->> 🚨
🚨 Since release 3.0.0-beta.11 ->> 🚨
Checking of types has been removed in all methods of the plugin both iOS & Android. This has been achieved to allow the use of others RDBMS types. The type checking is now under the responsability of the developers.
NULL values are now returned as null
values for the query
method is now an Array of any.
option to disable transaction
for the execute
, executeSet
, run
.
🚨 Since release 3.0.0-beta.11 <<- 🚨
The test has been achieved on:
The 2.9.x
is now 🛑 NOT MAINTAINED ANYMORE 🛑.
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:
db.open(), db.close, ...
androidx.sqlite.db.xxx
@journeyapps/sqlcipher
on MacOs, !!! NOT ON WINDOWS !!!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
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:
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.
npm install @capacitor-community/sqlite
npm run build
npx cap add android
npx cap add ios
npx cap add @capacitor-community/electron
and do when you update
npx cap sync
npx cap sync @capacitor-community/electron
sql-wasm.wasm
from nodes_modules/sql.js/dist/sql-wasm.wasm
to the src/assets
folder of YOUR_APPsql-wasm.wasm
from nodes_modules/sql.js/dist/sql-wasm.wasm
to the public/assets
folder of YOUR_APPcd electron
npm install --save sqlite3
npm install --save-dev @types/sqlite3
npm run build
npm run build
npx cap copy
npx cap copy web
npx cap copy @capacitor-community/electron
ionic serve
npm run serve
npm run start
npx cap open ios
npx cap open android
npx cap open @capacitor-community/electron
No configuration required for this plugin
Name | Android | iOS | Electron | Web |
---|---|---|---|---|
createConnection | ✅ | ✅ | ✅ | ✅ |
closeConnection | ✅ | ✅ | ✅ | ✅ |
isConnection | ✅ | ✅ | ✅ | ✅ |
open (non-encrypted DB) | ✅ | ✅ | ✅ | ✅ |
open (encrypted DB) | ✅ | ✅ | ❌ | ❌ |
close | ✅ | ✅ | ✅ | ✅ |
getVersion | ✅ | ✅ | ✅ | ✅ |
execute | ✅ | ✅ | ✅ | ✅ |
executeSet | ✅ | ✅ | ✅ | ✅ |
run | ✅ | ✅ | ✅ | ✅ |
query | ✅ | ✅ | ✅ | ✅ |
deleteDatabase | ✅ | ✅ | ✅ | ✅ |
importFromJson | ✅ | ✅ | ✅ | ✅ |
exportToJson | ✅ | ✅ | ✅ | ✅ |
createSyncTable | ✅ | ✅ | ✅ | ✅ |
setSyncDate | ✅ | ✅ | ✅ | ✅ |
getSyncDate | ✅ | ✅ | ✅ | ✅ |
isJsonValid | ✅ | ✅ | ✅ | ✅ |
isDBExists | ✅ | ✅ | ✅ | ✅ |
addUpgradeStatement | ✅ | ✅ | ✅ | ✅ |
copyFromAssets | ✅ | ✅ | ✅ | ✅ |
isDBOpen | ✅ | ✅ | ✅ | ✅ |
isDatabase | ✅ | ✅ | ✅ | ✅ |
isTableExists | ✅ | ✅ | ✅ | ✅ |
getDatabaseList | ✅ | ✅ | ✅ | ✅ |
addSQLiteSuffix | ✅ | ✅ | ❌ | ❌ |
deleteOldDatabases | ✅ | ✅ | ❌ | ❌ |
checkConnectionsConsistency | ✅ | ✅ | ✅ | ✅ |
isSecretStored | ✅ | ✅ | ❌ | ❌ |
setEncryptionSecret | ✅ | ✅ | ❌ | ❌ |
changeEncryptionSecret | ✅ | ✅ | ❌ | ❌ |
-Datatypes In SQLite Version 3
The IOS and Android codes are using SQLCipher
allowing for database encryption.
The Electron code is using sqlite3
.
The Web code is using the Stencil component jeep-sqlite
based on sql.js
and localforage
.
Thanks goes to these wonderful people (emoji key):
Jean Pierre Quéau 💻 | Paul Antoine 💻 | Karyfars 💻 | Chriswep 📖 | Nirajhinge 💻 | Dirk Gausmann 💻 | Mike Summerfeldt 💻 | Peakcool 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
3.2.2-1 (2021-09-11)
FAQs
Community plugin for native & electron SQLite databases
The npm package @capacitor-community/sqlite receives a total of 5,403 weekly downloads. As such, @capacitor-community/sqlite popularity was classified as popular.
We found that @capacitor-community/sqlite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.