
Documentation
What does it do?
- It introspects a Database
- It analyzes the tables and views
- It creates INSERT, SELECT, UPDATE, DELETE, SEARCH and LIST stored procedures for every TABLE.
- It creates LIST and SEARCH stored procedure for every VIEW.
- If there are foreign keys, it creates SELECT_WITH_FK, LIST_WITH_FK, and LIST_FORIEGNKEY_LABELS stored procedures.
- It adds them to the database.
- It assigns the proper GRANT permissions
Then it does a second pass
- It introspects the database
- It analyses all of the stored procedures not just the ones the process creates
- It creates two sets of CFC's: GATEWAY and DAO
- It creates a DAO for each TABLE and VIEW.
- It creates the <cfstoredProcedure> calls for each stored procedure
- It creates the <cffunction> to wrap the storedprocedure in.
- It adds each <cffunction> <cfstoredproc> combo within the appropriate CFC per table.
- It places any operation with SELECT, DELETE, UPDATE, AND INSERT in the title within the DAO CFC'S.
- It places all other actions to the GATEWAY CFC's.
- It writes the CFC's to disk.
- It writes Custom Tag components to produce nuggets of Editing and Listing functions.
- It strings all of these together to produce a simplistic CRUD application.
Optionally it will do the following:
- Build Unit Tests.
- Run Unit Tests
- Build Ant Script
- Build Documentation
- Build Coldspring Configs
Requirements
- ColdFusion 8
- MySQL 5, Microsoft Sql Server 2000/2005, Oracle 10g
- Requires account with ability to create and drop objects
- All tables must have identity (MSSQL), auto increment (MySQL) or a sequence (Oracle).
Restrictions
- Squidhead needs CF8 to run, but application can run on CF 7.
- Preferably the id should be [table name]Id (Meaning I haven't found all the bugs)
- Fields named "createdOn", "updatedOn" will be automatically set (Can be changed in configuration)
- Field named "createdBy" will only be set on create method
- A bit field named 'active' will alter behvior of table. It will deactivate instead of delete records. (Can be changed in config)
- All stored procedures should be named "usp_[tableName]_[action]"
- Table names need to be one word, Camel case is okay No longer true as of version 0.8.4
- Action can contain underscore.