DataFaucet ORM


DataFaucet is designed to be easy to install.

  1. Create a database and configure it in the ColdFusion administrator. I named my DSN "DataFaucet".
  2. Download the latest version from RIAForge. Extract the archive to your server. Note the location. You may want to create a /datafaucet mapping either in the ColdFusion administrator or in your Application.cfc to help with the next step, although it's not required.
  3. Open the faucet in your application:
    • Application.cfm - Add this tag
      <cfmodule template="/path/to/datafacuet/open.cfm" />
      (NOTE: DataFaucet only has two custom tags for very specific purposes - the rest of the system is entirely CFC-driven. This tag in particular exists to eliminate dependency on specific ColdFusion server mappings.)
    • Application.cfc - Same as above, however the tag should be placed in the onRequestStart method and optionally if you want to use DataFaucet in your onApplicationStart event, at the beginning of that event also. - See the template /samples/Application.cfc to see an example of this.
  4. Add attributes to the CFMODULE tag for your database:
    • datasource - the name of your ColdFusion DSN - this is used as the datasource attribute of CFQUERY tags
    • server - the type of database server you're using
      NOTE: this is optional if you're using one of the already supported database platforms - some platforms may be cross-compatible, for example, "mssql" may work for a Sybase datasource
      • msaccess - Microsoft Access
      • mssql - Microsoft SQL Server
      • mysql - MySQL
      • oracle - Oracle
    • schema - for Microsoft SQL Server this is usually "DBO" - this is not required for MS Access or MySQL
    • username - optional if entered in the ColdFusion administrator
    • password - optional if entered in the ColdFusion administrator


So if you were using a Microsoft SQL Server database named "DataWarehouse", your configuration tag would look like this:

  [password="mypassword"] />

That's it, you should be good to go.