Chapter 9. Data Stores

Databases can be located in many places: in a local directory, on a connected handheld, or even in a remote database server. Pyrite uses a common interface to allow databases in any location to be accessed by the application, without requiring much in the way of location-specific support.

The Store interface organizes databases into simple, flat collections, since that is how the Palm OS organizes them inside the handheld. Each Store object manages access to a single collection; within a Store, each database must have a unique name.

Using Data Stores

In order to access a database collection, the application must use one of the modules found in the Store subpackage. As with other plug-in collections, the Store package contains, by convention, one module for each type of data store, and that module exports a class called Store. For example, the "directory" data store class is actually PDA.Palm.Store.Directory.Store. The following store modules are currently available:

Store.Store

Base class for all other data store classes; all methods raise RuntimeError.

Store.Directory

A collection of databases in an arbitrary directory.

Store.DLP

A DLP-connected Palm Computing platform device.