Class SimpleStorageCps
- Defined in: SimpleStorage.js
Constructor Attributes | Constructor Name and Description |
---|---|
SimpleStorageCps(aTblName)
You should not instanciate this class directly.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
get(aKey, k)
Find the data associated to the given key.
|
|
has(aKey, k)
Check whether there is data associated to the given key.
|
|
remove(aKey, k)
Remove data associated with the given key.
|
|
set(aKey, aVal, k)
Store data for the given key.
|
Class Detail
SimpleStorageCps(aTblName)
You should not instanciate this class directly. Use SimpleStorage.createCpsStyle.
- Parameters:
- aTblName
Method Detail
-
get(aKey, k)Find the data associated to the given key.
- Parameters:
- {String} aKey
- The key used to identify your data.
- {Function} k
- A function that expects the javascript object you initially stored, or null.
-
has(aKey, k)Check whether there is data associated to the given key.
- Parameters:
- {String} aKey
- The key.
- {Function} k
- A function that expects a boolean.
-
remove(aKey, k)Remove data associated with the given key.
- Parameters:
- {String} aKey
- The key.
- {Function} k
- A function that expects a boolean telling whether data was actually removed or not.
-
set(aKey, aVal, k)Store data for the given key. It will erase any previous binding if any, and you'll lose the data previously associated with that key.
- Parameters:
- {String} aKey
- The key.
- {Object} aVal
- The value that is to be associated with the key.
- {Function} k
- A function that expects one argument and will be called when the data is stored. The argument is true if the row was added, false if it was just updated.