Titanium.Database

Submodule of Titanium.
Platform Since
Android 0.1
iPhone 0.1
iPad 0.1
Mobile Web 1.8

Summary

The top level Database module. The Database module is used for creating and accessing the in-application Database.

Objects

Name Summary
Titanium.Database.DB

The Database instance returned by Titanium.Database.open or Titanium.Database.install.

Titanium.Database.ResultSet

The ResultSet instance returned by invoking a database SQL execute.

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

fireEvent

Fires a synthesized event to any registered listeners.

getFile

Gets the value of the file property. (iPhone, iPad only.)

install

install a database from the application Resources folder (at build time) and return a reference to the opened database. it is safe to call this method multiple times since this method will only install once if it doesn't already exist on the device. (Android, iPhone, iPad only.)

open

open a database. if it doesn't yet exist, create it.

removeEventListener

Removes the specified callback as an event listener for the named event.

Properties

Name Type Summary
FIELD_TYPE_DOUBLE Number

constant for requesting a column's value returned in double form. read-only

FIELD_TYPE_FLOAT Number

constant for requesting a column's value returned in float form. read-only

FIELD_TYPE_INT Number

constant for requesting a column's value returned in integer form. read-only

FIELD_TYPE_STRING Number

constant for requesting a column's value returned in string form. read-only

file Titanium.Filesystem.File

Returns a object representing the database itself. (iPhone, iPad only.) read-only

Events

This type has no events.