Titanium.Database.DB

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

Summary

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

Methods

Name Summary
addEventListener

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

close

Closes the database and releases resources from memory. Once closed, this instance is no longer valid and should not be used.

execute

Executes an SQL statement against the database and returns a ResultSet.

fireEvent

Fires a synthesized event to any registered listeners.

getFile

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

getLastInsertRowId

Gets the value of the lastInsertRowId property.

getName

Gets the value of the name property.

getRowsAffected

Gets the value of the rowsAffected property.

remove

Removes the database files for this instance from disk. WARNING: this is a destructive operation and cannot be reversed. All data in the database will be lost; use with caution. (Android only.)

removeEventListener

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

setLastInsertRowId

Sets the value of the lastInsertRowId property.

setName

Sets the value of the name property.

setRowsAffected

Sets the value of the rowsAffected property.

Properties

Name Type Summary
file Titanium.Filesystem.File

A File object representing the file where this database is stored. Must only be used for setting file properties. (iPhone, iPad only.) read-only

lastInsertRowId Number

The identifier of the last populated row.

name String

The name of the database.

rowsAffected Number

The number of rows affected by the last query.

Events

This type has no events.