Socket
Socket
Sign inDemoInstall

@capacitor-community/sqlite

Package Overview
Dependencies
Maintainers
19
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/sqlite - npm Package Compare versions

Comparing version 2.9.0-alpha.5 to 2.9.0-alpha.6

electron/dist/esm/electron/src/definitions.d.ts

32

CHANGELOG.md

@@ -0,1 +1,33 @@

## 2.9.0-alpha.6 (2020-12-14) REFACTOR
### Chore
- update to @capacitor/core@2.4.4
### Added Features Electron platform
- createConnection
- closeConnection
- open (non-encrypted DB)
- open (encrypted DB)
- close
- execute
- executeSet
- run
- query
- deleteDatabase
- createSyncTable
- setSyncDate
- isDBExists
- addUpgradeStatement
### Added Features All Platforms
- in capSQLiteSet the values can be an any[] or any[][]
### Bug Fixes
- Update the README and add a link to a Ionic/React app.
- Update the API documentation
## 2.9.0-alpha.5 (2020-12-02) REFACTOR

@@ -2,0 +34,0 @@

17

dist/esm/definitions.d.ts

@@ -111,6 +111,7 @@ declare module '@capacitor/core' {

* Create a synchronization table
* @param options: capSQLiteOptions
* @returns Promise<capSQLiteChanges>
* @since 2.0.1-1
*/
createSyncTable(): Promise<capSQLiteChanges>;
createSyncTable(options: capSQLiteOptions): Promise<capSQLiteChanges>;
/**

@@ -279,5 +280,5 @@ * Set the synchronization date

/**
* the number of changes from an execute or run command
* a returned Changes
*/
changes?: any;
changes?: Changes;
/**

@@ -288,2 +289,12 @@ * a returned message

}
export interface Changes {
/**
* the number of changes from an execute or run command
*/
changes?: number;
/**
* the lastId created from a run command
*/
lastId?: number;
}
export interface capSQLiteValues {

@@ -290,0 +301,0 @@ /**

6

dist/esm/web.d.ts

@@ -6,5 +6,5 @@ import { WebPlugin } from '@capacitor/core';

echo(options: capEchoOptions): Promise<capEchoResult>;
createConnection(options: capSQLiteOptions): Promise<any>;
createConnection(options: capSQLiteOptions): Promise<capSQLiteResult>;
open(options: capSQLiteOptions): Promise<capSQLiteResult>;
closeConnection(options: capSQLiteOptions): Promise<any>;
closeConnection(options: capSQLiteOptions): Promise<capSQLiteResult>;
close(options: capSQLiteOptions): Promise<capSQLiteResult>;

@@ -20,3 +20,3 @@ execute(options: capSQLiteExecuteOptions): Promise<capSQLiteChanges>;

exportToJson(options: capSQLiteExportOptions): Promise<capSQLiteJson>;
createSyncTable(): Promise<capSQLiteChanges>;
createSyncTable(options: capSQLiteOptions): Promise<capSQLiteChanges>;
setSyncDate(options: capSQLiteSyncDateOptions): Promise<capSQLiteResult>;

@@ -23,0 +23,0 @@ addUpgradeStatement(options: capSQLiteUpgradeOptions): Promise<capSQLiteResult>;

@@ -11,2 +11,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { WebPlugin } from '@capacitor/core';
//1234567890123456789012345678901234567890123456789012345678901234567890
export class CapacitorSQLiteWeb extends WebPlugin {

@@ -65,3 +66,3 @@ constructor() {

return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -75,3 +76,3 @@ });

return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -85,3 +86,3 @@ });

return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -95,3 +96,3 @@ });

return Promise.resolve({
result: false,
values: [],
message: `Not implemented on Web Platform`,

@@ -141,3 +142,2 @@ });

return Promise.resolve({
result: false,
message: `Not implemented on Web Platform`,

@@ -147,7 +147,7 @@ });

}
createSyncTable() {
createSyncTable(options) {
return __awaiter(this, void 0, void 0, function* () {
console.log('createSyncTable');
console.log('createSyncTable', options);
return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -154,0 +154,0 @@ });

@@ -225,2 +225,3 @@ var capacitorPlugin = (function (exports, core) {

};
//1234567890123456789012345678901234567890123456789012345678901234567890
class CapacitorSQLiteWeb extends core.WebPlugin {

@@ -279,3 +280,3 @@ constructor() {

return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -289,3 +290,3 @@ });

return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -299,3 +300,3 @@ });

return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -309,3 +310,3 @@ });

return Promise.resolve({
result: false,
values: [],
message: `Not implemented on Web Platform`,

@@ -355,3 +356,2 @@ });

return Promise.resolve({
result: false,
message: `Not implemented on Web Platform`,

@@ -361,7 +361,7 @@ });

}
createSyncTable() {
createSyncTable(options) {
return __awaiter$1(this, void 0, void 0, function* () {
console.log('createSyncTable');
console.log('createSyncTable', options);
return Promise.resolve({
result: false,
changes: { changes: -1 },
message: `Not implemented on Web Platform`,

@@ -368,0 +368,0 @@ });

{
"name": "@capacitor-community/sqlite",
"version": "2.9.0-alpha.5",
"version": "2.9.0-alpha.6",
"description": "Capacitor SQLite Plugin",

@@ -26,6 +26,6 @@ "homepage": "https://github.com/capacitor-community/sqlite",

"devDependencies": {
"@capacitor/android": "^2.4.3",
"@capacitor/core": "^2.4.3",
"@capacitor/android": "^2.4.4",
"@capacitor/core": "^2.4.4",
"@capacitor/docgen": "0.0.10",
"@capacitor/ios": "^2.4.3",
"@capacitor/ios": "^2.4.4",
"@ionic/prettier-config": "^1.0.0",

@@ -35,3 +35,3 @@ "@ionic/swiftlint-config": "^1.1.1",

"@types/node": "^12.12.62",
"electron": "^10.1.2",
"electron": "^11.1.0",
"husky": "^4.2.5",

@@ -55,3 +55,3 @@ "np": "^6.5.0",

"peerDependencies": {
"@capacitor/core": "^2.4.3"
"@capacitor/core": "^2.4.4"
},

@@ -58,0 +58,0 @@ "files": [

@@ -39,6 +39,14 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p>

Refactor available for `Android` and `iOS` platforms only.
Refactor available for `Android`, `iOS` and `Electron` platforms.
The test will be achieved on a Ionic/Angular app. For the other frameworks, it will require an update of the `react-sqlite-hook`and the `vue-sqlite-hook`.
The test has been achieved on:
- a [Ionic/Angular app](#ionic/angular)
- a [Ionic/React app](#ionic/react)
Other frameworks will be tested later
- Ionic/Vue will require an update of the `vue-sqlite-hook`.
- Stencil
## Installation

@@ -48,5 +56,7 @@

npm install @capacitor-community/sqlite@refactor
npm run build
npx cap sync
npx cap add android
npx cap add ios
npx cap add @capacitor-community/electron
```

@@ -88,2 +98,36 @@

### Electron
- 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
```
npx cap open @capacitor-community/electron
```
## Configuration

@@ -97,19 +141,19 @@

| :---------------------- | :------ | :-- | :------- | :-- |
| createConnection | ✅ | ✅ | ❌ | ❌ |
| closeConnection | ✅ | ✅ | ❌ | ❌ |
| open (non-encrypted DB) | ✅ | ✅ | ❌ | ❌ |
| open (encrypted DB) | ✅ | ✅ | ❌ | ❌ |
| close | ✅ | ✅ | ❌ | ❌ |
| execute | ✅ | ✅ | ❌ | ❌ |
| executeSet | ✅ | ✅ | ❌ | ❌ |
| run | ✅ | ✅ | ❌ | ❌ |
| query | ✅ | ✅ | ❌ | ❌ |
| deleteDatabase | ✅ | ✅ | ❌ | ❌ |
| createConnection | ✅ | ✅ | ✅ | ❌ |
| closeConnection | ✅ | ✅ | ✅ | ❌ |
| open (non-encrypted DB) | ✅ | ✅ | ✅ | ❌ |
| open (encrypted DB) | ✅ | ✅ | ✅ | ❌ |
| close | ✅ | ✅ | ✅ | ❌ |
| execute | ✅ | ✅ | ✅ | ❌ |
| executeSet | ✅ | ✅ | ✅ | ❌ |
| run | ✅ | ✅ | ✅ | ❌ |
| query | ✅ | ✅ | ✅ | ❌ |
| deleteDatabase | ✅ | ✅ | ✅ | ❌ |
| importFromJson | ❌ | ❌ | ❌ | ❌ |
| exportToJson | ❌ | ❌ | ❌ | ❌ |
| createSyncTable | ✅ | ✅ | ❌ | ❌ |
| setSyncDate | ✅ | ✅ | ❌ | ❌ |
| createSyncTable | ✅ | ✅ | ✅ | ❌ |
| setSyncDate | ✅ | ✅ | ✅ | ❌ |
| isJsonValid | ❌ | ❌ | ❌ | ❌ |
| isDBExists | ✅ | ✅ | ❌ | ❌ |
| addUpgradeStatement | ✅ | ✅ | ❌ | ❌ |
| isDBExists | ✅ | ✅ | ✅ | ❌ |
| addUpgradeStatement | ✅ | ✅ | ✅ | ❌ |

@@ -134,4 +178,6 @@ ## Documentation (to be updated)

### Ionic/React (to come later)
### Ionic/React
- [react-sqlite-app-refactor](https://github.com/jepiqueau/react-sqlite-app-starter/tree/refactor)
### Ionic/Vue (to come later)

@@ -385,4 +431,4 @@

The IOS and Android codes are using SQLCipher allowing for database encryption
The Electron code use sqlite3
The IOS and Android codes are using `SQLCipher` allowing for database encryption
The Electron code use `@journeyapps/sqlcipher` allowing for database encryption

@@ -389,0 +435,0 @@ ## Contributors ✨

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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