DataMgr 1.1 Released

DataMgr 1.1 is out today. It fixes a few small bugs and adds a few enhancements that should make more common database interactions easier.

New methods in 1.1:

  • getMaxRowsPrefix
  • getMaxRowsSuffix
  • getNewSortNum
  • saveSortOrder
The first two methods help limit the rows returned from a query. Basically, getMaxRowsPrefix() returns "TOP X" for all databases except MySQL and getMaxRowsSuffix() returns "LIMIT X" for MySQL (where "X" is the maximum rows to return).

The saveSortOrder() method sets the values of a numeric field representing sort-order to the order you specifiy. Just pass the name of the table that you want to sort, the name of the column used to indicate the sort-order, and a comma delimited list of the primary key values in the desired order.

The getNewSortNum() method returns the value to use for the given numeric sort-order field to put a record after all other records. I use to put a new record after all existing records.

The getRecords method also has a new argument: "maxrows", which you can use to limit the number of results returned in the query (using - you guessed it - the first two methods mentioned earlier).

Additionally, I have added the ability to populate a table with data when using loadXML to ensure the existence of required tables and columns. This helps with easy deployment, but is beyond the scope of this post.

Support for MS Access is still somewhat limited. It can be used on ColdFusion MX 7 and higher as normal. It can only be used on previous version by loading tables via loadXML().

If you have any ideas for making DataMgr more useful, let me know and I would be glad to consider it.

Feel free to download DataMgr and try it out. It is free and open-source. You can also find documentation and links to other blog entries about using DataMgr.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.