DataMgr Build 1 Documentation: Extending DataMgr

Extending DataMgr

You can add your own functionality into DataMgr without worrying about how your change will be impacted by future upgrade. The DataMgr.cfc file itself is basically empty (extending another file that holds the functionality).

Just add your own methods to DataMgr.cfc and then you can use them just like you would any native method in DataMgr.

If you want to extend a database-specific feature, you will have to create your own adapator that extends the adaptor you are enhancing.

For example, to extend MSSQL:

<cfcomponent extends="DataMgr_MSSQLSteve">

That component would then have to be called explicity setting the database:

<cfset DataMgr = CreateObject("component","DataMgr").init(dsn,"MSSQLSteve")>