Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor-community/sqlite

Package Overview
Dependencies
Maintainers
15
Versions
242
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.1 to 2.9.0-alpha.2

android/.classpath

11

CHANGELOG.md

@@ -0,1 +1,12 @@

## 2.9.0-alpha.2 (2020-11-23) REFACTOR
### Chore
- update to @capacitor/core@2.4.3
### Added Features Android platform only
- add Wrappers documentation (APIConnection && APIDBConnection)
- add `isDBExists`, `deleteDatabase` methods
## 2.9.0-alpha.1 (2020-11-22) REFACTOR

@@ -2,0 +13,0 @@

@@ -381,4 +381,25 @@ declare module '@capacitor/core' {

export interface ISQLiteConnection {
/**
* Echo a value
* @param value
* @returns Promise<capEchoResult>
* @since 2.9.0 refactor
*/
echo(value: string): Promise<capEchoResult>;
/**
* Create a connection to a database
* @param database
* @param encrypted
* @param mode
* @param version
* @returns Promise<SQLiteDBConnection | null>
* @since 2.9.0 refactor
*/
createConnection(database: string, encrypted: boolean, mode: string, version: number): Promise<SQLiteDBConnection | null>;
/**
* Close a database connection
* @param database
* @returns Promise<capSQLiteResult>
* @since 2.9.0 refactor
*/
closeConnection(database: string): Promise<capSQLiteResult>;

@@ -400,8 +421,62 @@ }

export interface ISQLiteDBConnection {
/**
* Get SQLite DB Connection DB name
* @returns Promise<string>
* @since 2.9.0 refactor
*/
getConnectionDBName(): string;
/**
* Open a SQLite DB Connection
* @returns Promise<capSQLiteResult>
* @since 2.9.0 refactor
*/
open(): Promise<capSQLiteResult>;
/**
* Close a SQLite DB Connection
* @returns Promise<capSQLiteResult>
* @since 2.9.0 refactor
*/
close(): Promise<capSQLiteResult>;
/**
* Execute SQLite DB Connection Statements
* @param statements
* @returns Promise<capSQLiteChanges>
* @since 2.9.0 refactor
*/
execute(statements: string): Promise<capSQLiteChanges>;
/**
* Execute SQLite DB Connection Query
* @param statement
* @param values (optional)
* @returns Promise<Promise<capSQLiteValues>
* @since 2.9.0 refactor
*/
query(statement: string, values?: Array<string>): Promise<capSQLiteValues>;
/**
* Execute SQLite DB Connection Raw Statement
* @param statement
* @param values (optional)
* @returns Promise<capSQLiteChanges>
* @since 2.9.0 refactor
*/
run(statement: string, values?: Array<any>): Promise<capSQLiteChanges>;
/**
* Execute SQLite DB Connection Set
* @param set
* @returns Promise<capSQLiteChanges>
* @since 2.9.0 refactor
*/
executeSet(set: Array<capSQLiteSet>): Promise<capSQLiteChanges>;
/**
* Check if a SQLite DB Connection exists
* @returns Promise<capSQLiteResult>
* @since 2.9.0 refactor
*/
isExists(): Promise<capSQLiteResult>;
/**
* Delete a SQLite DB Connection
* @returns Promise<capSQLiteResult>
* @since 2.9.0 refactor
*/
delete(): Promise<capSQLiteResult>;
}

@@ -415,2 +490,3 @@ /**

constructor(dbName: string, sqlite: any);
getConnectionDBName(): string;
open(): Promise<capSQLiteResult>;

@@ -422,2 +498,4 @@ close(): Promise<capSQLiteResult>;

executeSet(set: Array<capSQLiteSet>): Promise<capSQLiteChanges>;
isExists(): Promise<capSQLiteResult>;
delete(): Promise<capSQLiteResult>;
}

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

}
getConnectionDBName() {
return this.dbName;
}
open() {

@@ -127,3 +130,19 @@ return __awaiter(this, void 0, void 0, function* () {

}
isExists() {
return __awaiter(this, void 0, void 0, function* () {
const res = yield this.sqlite.isDBExists({
database: this.dbName,
});
return res;
});
}
delete() {
return __awaiter(this, void 0, void 0, function* () {
const res = yield this.sqlite.deleteDatabase({
database: this.dbName,
});
return res;
});
}
}
//# sourceMappingURL=definitions.js.map

@@ -57,2 +57,5 @@ var capacitorPlugin = (function (exports, core) {

}
getConnectionDBName() {
return this.dbName;
}
open() {

@@ -130,2 +133,18 @@ return __awaiter(this, void 0, void 0, function* () {

}
isExists() {
return __awaiter(this, void 0, void 0, function* () {
const res = yield this.sqlite.isDBExists({
database: this.dbName,
});
return res;
});
}
delete() {
return __awaiter(this, void 0, void 0, function* () {
const res = yield this.sqlite.deleteDatabase({
database: this.dbName,
});
return res;
});
}
}

@@ -132,0 +151,0 @@

15

package.json
{
"name": "@capacitor-community/sqlite",
"version": "2.9.0-alpha.1",
"version": "2.9.0-alpha.2",
"description": "Capacitor SQLite Plugin",

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

"watch": "tsc --watch",
"docgen": "docgen --api CapacitorSQLitePlugin --output-readme docs/API.md",
"docgen": "npm run docgenPlugin && npm run docgenConnection && npm run docgenDBConnection",
"docgenPlugin": "docgen --api CapacitorSQLitePlugin --output-readme docs/API.md",
"docgenConnection": "docgen --api ISQLiteConnection --output-readme docs/APIConnection.md",
"docgenDBConnection": "docgen --api ISQLiteDBConnection --output-readme docs/APIDBConnection.md",
"prepublishOnly": "npm run build"

@@ -24,6 +27,6 @@ },

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

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

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

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

6

README.md

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

| query | ✅ | ❌ | ❌ | ❌ |
| deleteDatabase | ❌ | ❌ | ❌ | ❌ |
| deleteDatabase | ✅ | ❌ | ❌ | ❌ |
| importFromJson | ❌ | ❌ | ❌ | ❌ |

@@ -112,2 +112,6 @@ | exportToJson | ❌ | ❌ | ❌ | ❌ |

[API_Connection_Wrapper_Documentation](https://github.com/capacitor-community/sqlite/blob/master/docs/APIConnection.md)
[API_DB_Connection_Wrapper_Documentation](https://github.com/capacitor-community/sqlite/blob/master/docs/APIDBConnection.md)
[ImportExportJson_Documentation](https://github.com/capacitor-community/sqlite/blob/master/docs/ImportExportJson.md)

@@ -114,0 +118,0 @@

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