Members
(inner) database
Holds the indexedDB database.
- Source:
Methods
(inner) clearDatabase(objectStore, callbackopt)
Clears a given table in the database.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
objectStore |
Object | The objectStore which should get cleared. | |
callback |
function |
<optional> |
Optional callback function. |
- Source:
(inner) getAllDatabaseEntries(objectStore, callback)
Returns all entries from a table in our database.
Parameters:
Name | Type | Description |
---|---|---|
objectStore |
Object | The table we want to update. |
callback |
function | Mandatory callback function with result from database as parameter. |
- Source:
(inner) getFromDatabase(objectStore, key, callback)
Returns the value for a given key from our indexedDB database.
Parameters:
Name | Type | Description |
---|---|---|
objectStore |
Object | The table we want to update. |
key |
string | The key of the item we want to update/add. |
callback |
function | Mandatory callback function with result from database as parameter. |
- Source:
(inner) initDatabase(callbackopt)
Creates a database, if no database exists yet. Saves the database in the dedicated variable.
The database contains the following tables:
searchTerms: searchParams: thirdParties: visits:
url | keywords url | params url | thirdPartyRequests url | visitCount
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Optional callback function. |
- Source:
(inner) storeInDatabase(objectStore, key, val, appendopt, callbackopt)
Adds new entries to our indexedDB database.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
objectStore |
Object | The table we want to update. | ||
key |
string | The key of the item we want to update/add. | ||
val |
Object | The new value for the given key. | ||
append |
bool |
<optional> |
true | Specifies if a value should be appended or overwritten. |
callback |
function |
<optional> |
Optional callback function, executed after updating the database. |
- Source: