Specify table type?

4 views
Skip to first unread message

Skellington

unread,
Feb 22, 2011, 12:09:29 PM2/22/11
to DataMgr
Hello,
Is it possible to specify the table type using DataMgr? I'm using the
loadXML function and I want to Specify a InnoDB table type instead of
MyISAM.

Thanks,
Charlie

Steve Bryant

unread,
Feb 22, 2011, 5:40:34 PM2/22/11
to dat...@googlegroups.com
Charlie,

Not currently.

It should be possible to create a mod for that in DataMgr.cfc (which
is otherwise blank by default).
http://www.bryantwebconsulting.com/docs/datamgr/extending-datamgr.cfm?version=2.5

The XML would probably be something like <table name="mytable"
mysqltype="InnoDB">.

Let me know how you make out.

Steve

Skellington

unread,
Feb 24, 2011, 10:54:39 AM2/24/11
to DataMgr
Hi Steve,
I have not used the "extends" feature of cfml for cfc's before but I
will give it a shot.

Thanks,
Charles

On Feb 22, 2:40 pm, Steve Bryant <sebto...@gmail.com> wrote:
> Charlie,
>
> Not currently.
>
> It should be possible to create a mod for that in DataMgr.cfc (which
> is otherwise blank by default).http://www.bryantwebconsulting.com/docs/datamgr/extending-datamgr.cfm...

Skellington

unread,
Feb 24, 2011, 11:18:28 AM2/24/11
to DataMgr
Hi Steve,
I dont want to be a pest, and ask to many questions but I could use a
little help to get started.

I have read through the code and in order to make this change it looks
like I would need to edit the following files and functions to include
a tableType argument.

_DataMgr.cfc
CreateTable
CreateTables
loadXML

DataMgr_MYSQL.cfc
getCreateSQL


Now I know I could edit the code directly but I do want to learn how
to use the extends feature. So my question is, do I just copy the
following functions to the "DataMgr.cfc" file and edit them there,
thus overriding the functions from _DataMgr.cfc and DataMgr_MYSQL.cfc?


Thanks,
Charlie

Steve Bryant

unread,
Feb 24, 2011, 11:51:14 AM2/24/11
to dat...@googlegroups.com
Charlie,

Not a pest at all - those are great questions. I will try to update
the docs to address all of this. In the meantime:

Copy the methods from _DataMgr.cfc to DataMgr.cfc that you want to modify.

If you need to modify methods from DataMgr_MYSQL.cfc, however, you
will have to create a new component for that.

So, you could create DataMgr_MYSQLSkellington.cfc. In the file set
extends="DataMgr_MYSQL". Copy the method(s) that you want to modify
into that file.

When you instantiate DataMgr you will have to manually set the
database argument to "MYSQLSkellington".

Then you can modify DataMgr.cfc and DataMgr_MYSQLSkellington.cfc to
add the functionality you want.

Let me know if you have any more questions.

Thanks,

Steve

Reply all
Reply to author
Forward
0 new messages