Configuration — JazzRecord JavaScript ORM Documentation
In addition to the configuration options covered in Migrations (namely fixtures and migrations), JazzRecord offers the following top-level configuration options:
JazzRecord.adapter: The primary configuration option, this determines which connection adapter is used. More on this below.JazzRecord.debug: A boolean variable which determines whether logging to console occurs or not. Defaults tofalse.JazzRecord.depth: The default depth for all finders, destroy calls and save operations. Associations will load/save this many levels beyond the base record. Defaults to 1.
Adapters
JazzRecord can be used in various runtime environments, and as such a different adapter is required to interface with that environment's specific SQL API. All adapters currently take an optional options object with one parameter: dbFile, which determines the name of the database to be associated with the application.
Setting an adapter is as simple as:
JazzRecord.adapter = new JazzRecord.AirAdapter();
The following adapters are provided for use in JazzRecord:
JazzRecord.AirAdapter: An interface to Adobe AIR.JazzRecord.GearsAdapter: An interface to Google's Gears project.JazzRecord.TitaniumAdapter: An interface to Appcelerator's Titanium project. (PR1 only)JazzRecord.HTML5Adapter: An interface to HTMML5-based environments like Titanium PR2 and Palm's webOS, which will use asynchronous capabilities to handle association-loading/linking/unlinking and validation. (Coming soon!)









