This repository has been archived by the owner on Sep 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated database access to improve performance and prevent memory lea…
…ks #207 #201
- Loading branch information
Showing
20 changed files
with
432 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const StorageBucket = require('./StorageBucket') | ||
|
||
class StorageBucketAppMutable extends StorageBucket { | ||
/** | ||
* @param k: the key to set | ||
* @param v: the value to set | ||
* @return v | ||
*/ | ||
setItem (k, v) { return this._setItem(k, v) } | ||
|
||
/** | ||
* @param k: the key to set | ||
* @param v: the value to set | ||
* @return v | ||
*/ | ||
setJSONItem (k, v) { return this._setItem(k, JSON.stringify(v)) } | ||
|
||
/** | ||
* @param k: the key to remove | ||
*/ | ||
removeItem (k) { return this._removeItem(k) } | ||
} | ||
|
||
module.exports = StorageBucketAppMutable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const StorageBucket = require('./StorageBucket') | ||
const StorageBucket = require('./StorageBucketAppMutable') | ||
module.exports = new StorageBucket('app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
appStorage: require('./appStorage'), | ||
avatarStorage: require('./avatarStorage'), | ||
mailboxStorage: require('./mailboxStorage'), | ||
settingStorage: require('./settingStorage') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.