You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Electron, Mobile: Created alarm service and drivers
This commit is contained in:
@ -2,6 +2,10 @@ const SQLite = require('react-native-sqlite-storage');
|
||||
|
||||
class DatabaseDriverReactNative {
|
||||
|
||||
constructor() {
|
||||
this.lastInsertId_ = null;
|
||||
}
|
||||
|
||||
open(options) {
|
||||
//SQLite.DEBUG(true);
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -45,6 +49,7 @@ class DatabaseDriverReactNative {
|
||||
exec(sql, params = null) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.db_.executeSql(sql, params, (r) => {
|
||||
if ('insertId' in r) this.lastInsertId_ = r.insertId;
|
||||
resolve(r);
|
||||
}, (error) => {
|
||||
reject(error);
|
||||
@ -52,6 +57,10 @@ class DatabaseDriverReactNative {
|
||||
});
|
||||
}
|
||||
|
||||
lastInsertId() {
|
||||
return this.lastInsertId_;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = { DatabaseDriverReactNative };
|
Reference in New Issue
Block a user