documentation

Documentation generator: JsDoc Toolkit 2.4.0
Template: Wink 1.0
Generated on:

Class wink.api.storage.SafariDb

Implements the database management methods for the Iphone

Class Summary
Constructor Attributes Constructor Name and Description
 
Compatibility
Compatibility list Supported platforms / browsers
iOS2, iOS3, iOS4, iOS5, iOS6, Android 2.1, Android 2.2, Android 2.3, Android 3.0, Android 3.1, Android 4.0, BlackBerry 6, BlackBerry 7, Bada 1.0

Method Summary

Class Detail

wink.api.storage.SafariDb()

Field Detail

{object} database
The local storage component
{integer} MAX_SIZE
The size of the database
Default Value:
5Mb
{integer} uId
Unique identifier
{string} VERSION
The version of the database
Default Value:
1.0

Method Detail

  • connect(descriptor)
    Connection/creation to/of the specified database
    Parameters:
    {object} descriptor
    The database descriptor
  • createTables()
    Create the tables described in the descriptor (erase all the previously stored datas)
  • emptyDatabase()
    Remove all the datas and the tables from the database
  • getById(tableName, entryId, callback)
    Get the entry with the specified id
    Parameters:
    {string} tableName
    The name of the table
    {integer} entryId
    The id of the element to get
    {object|function} callback
    The callback method to invoke after the result
  • getList(tableName, callback)
    Get all the entries of a table
    Parameters:
    {string} tableName
    The name of the table
    {object|function} callback
    The callback method to invoke after the result
  • getListByField(tableName, fieldName, fieldValue, callback)
    Get all the entries with the specified value in the specified field
    Parameters:
    {string} tableName
    The name of the table
    {string} fieldName
    The search field criteria
    {string} fieldValue
    The search field value
    {object|function} callback
    The callback method to invoke after the result
  • getTableList(callback)
    Get the list of all the tables in the database
    Parameters:
    {object|function} callback
    The callback method to invoke after the result
  • insert(tableName, entry, callback)
    Insert a new entry into a database table
    Parameters:
    {string} tableName
    The name of the table
    {object} entry
    An object representing an element of the table
    {object|function} callback
    The callback method to invoke after the result
  • remove(tableName, entryId, callback)
    Remove a particular entry
    Parameters:
    {string} tableName
    The name of the table
    {integer} entryId
    The id of the element to remove
    {object|function} callback
    The callback method to invoke after the result
  • update(tableName, entry, callback)
    Update a particular entry
    Parameters:
    {string} tableName
    The name of the table
    {object} entry
    An object representing an element of the table and containing the id of the element to update
    {object|function} callback
    The callback method to invoke after the result