IDBFactory

Overview

In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.)

Location

Required Methods


cmp

A method that compares two keys and returns a result indicating which one is greater in value.

 

method cmp(parfirst: dynamic; parsecond: dynamic): Int32

 

Int32 cmp(dynamic parfirst, dynamic parsecond)

 

func cmp(_ parfirst: dynamic, _ parsecond: dynamic) -> Int32

 

Int32 cmp(dynamic parfirst, dynamic parsecond)

 

Function cmp(parfirst As dynamic, parsecond As dynamic) As Int32

Parameters:

  • parfirst:
  • parsecond:

databases

A method that returns a list of all available databases, including their names and versions.

 

method databases: dynamic

 

dynamic databases()

 

func databases() -> dynamic

 

dynamic databases()

 

Function databases() As dynamic

deleteDatabase

A method to request the deletion of a database.

 

method deleteDatabase(parname: dynamic; paroptions: dynamic): IDBOpenDBRequest

 

IDBOpenDBRequest deleteDatabase(dynamic parname, dynamic paroptions)

 

func deleteDatabase(_ parname: dynamic, _ paroptions: dynamic) -> IDBOpenDBRequest

 

IDBOpenDBRequest deleteDatabase(dynamic parname, dynamic paroptions)

 

Function deleteDatabase(parname As dynamic, paroptions As dynamic) As IDBOpenDBRequest

Parameters:

  • parname:
  • paroptions:

open

The current method to request opening a connection to a database.

 

method open(parname: dynamic): IDBOpenDBRequest

 

IDBOpenDBRequest open(dynamic parname)

 

func open(_ parname: dynamic) -> IDBOpenDBRequest

 

IDBOpenDBRequest open(dynamic parname)

 

Function open(parname As dynamic) As IDBOpenDBRequest

Parameters:

  • parname: