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.2 to 2.9.0-alpha.3

android/src/main/java/com/getcapacitor/community/database/sqlite/SQLite/ImportExportJson/UtilsJson.java

24

CHANGELOG.md

@@ -0,1 +1,15 @@

## 2.9.0-alpha.3 (2020-11-25) REFACTOR
### Added Features Android platform only
- add addUpgradeStatement method
- add createSyncTable method
- add setSyncDate method
- update refactor app
### Bug Fixes
- creating database directory in physical device
- app crash when querying non existing tables or columns
## 2.9.0-alpha.2 (2020-11-23) REFACTOR

@@ -21,2 +35,12 @@

## 2.4.3-1 (2020-11-23)
### Chore
- update to @capacitor/core@2.4.3
### Bug Fixes
- Fix issue#56 INSERT null value on iOS
## 2.4.2 (2020-11-22)

@@ -23,0 +47,0 @@

@@ -389,2 +389,13 @@ declare module '@capacitor/core' {

/**
* Add the upgrade Statement for database version upgrading
* @param database
* @param fromVersion
* @param toVersion
* @param statement
* @param set
* @returns Promise<capSQLiteResult>
* @since 2.4.9 refactor
*/
addUpgradeStatement(database: string, fromVersion: number, toVersion: number, statement: string, set?: capSQLiteSet[]): Promise<capSQLiteResult>;
/**
* Create a connection to a database

@@ -414,2 +425,3 @@ * @param database

echo(value: string): Promise<capEchoResult>;
addUpgradeStatement(database: string, fromVersion: number, toVersion: number, statement: string, set?: capSQLiteSet[]): Promise<capSQLiteResult>;
createConnection(database: string, encrypted: boolean, mode: string, version: number): Promise<SQLiteDBConnection | null>;

@@ -482,2 +494,15 @@ closeConnection(database: string): Promise<capSQLiteResult>;

delete(): Promise<capSQLiteResult>;
/**
* Create a synchronization table
* @returns Promise<capSQLiteResult>
* @since 2.4.9 refactor
*/
createSyncTable(): Promise<capSQLiteChanges>;
/**
* Set the synchronization date
* @param syncdate
* @returns Promise<capSQLiteResult>
* @since 2.4.9 refactor
*/
setSyncDate(syncdate: string): Promise<capSQLiteResult>;
}

@@ -500,2 +525,4 @@ /**

delete(): Promise<capSQLiteResult>;
createSyncTable(): Promise<capSQLiteChanges>;
setSyncDate(syncdate: string): Promise<capSQLiteResult>;
}

34

dist/esm/definitions.js

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

}
addUpgradeStatement(database, fromVersion, toVersion, statement, set) {
return __awaiter(this, void 0, void 0, function* () {
let upgrade = {
fromVersion,
toVersion,
statement,
set: set ? set : [],
};
const res = yield this.sqlite.addUpgradeStatement({
database,
upgrade: [upgrade],
});
return res;
});
}
createConnection(database, encrypted, mode, version) {

@@ -31,3 +46,2 @@ return __awaiter(this, void 0, void 0, function* () {

});
console.log('>>> in SQLiteConnection createConnection ' + res.result);
if (res.result) {

@@ -101,3 +115,2 @@ return new SQLiteDBConnection(database, this.sqlite);

}
//1234567890123456789012345678901234567890123456789012345678901234567890
run(statement, values) {

@@ -148,3 +161,20 @@ return __awaiter(this, void 0, void 0, function* () {

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

@@ -25,2 +25,17 @@ var capacitorPlugin = (function (exports, core) {

}
addUpgradeStatement(database, fromVersion, toVersion, statement, set) {
return __awaiter(this, void 0, void 0, function* () {
let upgrade = {
fromVersion,
toVersion,
statement,
set: set ? set : [],
};
const res = yield this.sqlite.addUpgradeStatement({
database,
upgrade: [upgrade],
});
return res;
});
}
createConnection(database, encrypted, mode, version) {

@@ -34,3 +49,2 @@ return __awaiter(this, void 0, void 0, function* () {

});
console.log('>>> in SQLiteConnection createConnection ' + res.result);
if (res.result) {

@@ -104,3 +118,2 @@ return new SQLiteDBConnection(database, this.sqlite);

}
//1234567890123456789012345678901234567890123456789012345678901234567890
run(statement, values) {

@@ -151,2 +164,19 @@ return __awaiter(this, void 0, void 0, function* () {

}
createSyncTable() {
return __awaiter(this, void 0, void 0, function* () {
const res = yield this.sqlite.createSyncTable({
database: this.dbName,
});
return res;
});
}
setSyncDate(syncdate) {
return __awaiter(this, void 0, void 0, function* () {
const res = yield this.sqlite.setSyncDate({
database: this.dbName,
syncdate: syncdate,
});
return res;
});
}
}

@@ -153,0 +183,0 @@

2

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

@@ -5,0 +5,0 @@ "homepage": "https://github.com/capacitor-community/sqlite",

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

| exportToJson | ❌ | ❌ | ❌ | ❌ |
| createSyncTable | ❌ | ❌ | ❌ | ❌ |
| setSyncDate | ❌ | ❌ | ❌ | ❌ |
| createSyncTable | ✅ | ❌ | ❌ | ❌ |
| setSyncDate | ✅ | ❌ | ❌ | ❌ |
| isJsonValid | ❌ | ❌ | ❌ | ❌ |
| isDBExists | ✅ | ❌ | ❌ | ❌ |
| addUpgradeStatement | ❌ | ❌ | ❌ | ❌ |
| addUpgradeStatement | ✅ | ❌ | ❌ | ❌ |
## Documentation (to be updated)
[API_Documentation](https://github.com/capacitor-community/sqlite/blob/master/docs/API.md)
[API_Documentation](https://github.com/capacitor-community/sqlite/blob/refactor/docs/API.md)
[API_Connection_Wrapper_Documentation](https://github.com/capacitor-community/sqlite/blob/master/docs/APIConnection.md)
[API_Connection_Wrapper_Documentation](https://github.com/capacitor-community/sqlite/blob/refactor/docs/APIConnection.md)
[API_DB_Connection_Wrapper_Documentation](https://github.com/capacitor-community/sqlite/blob/master/docs/APIDBConnection.md)
[API_DB_Connection_Wrapper_Documentation](https://github.com/capacitor-community/sqlite/blob/refactor/docs/APIDBConnection.md)

@@ -116,0 +116,0 @@ [ImportExportJson_Documentation](https://github.com/capacitor-community/sqlite/blob/master/docs/ImportExportJson.md)

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