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

close the database and release resources from memory. once closed, this instance is no longer valid and must no longer be used.

execute

execute a SQL statement against the database and returns a ResultSet

fireEvent

Fires a synthesized event to any registered listeners.

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

remove 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 upon calling this function. Use with caution.

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
lastInsertRowId Number

the last row identifier by the last INSERT query

name String

the name of the database

rowsAffected Number

the number of rows affected by the last query

Events

This type has no events.