Well... I've figured out something for Queries, but I doubt I'll use it.
Here's some sample code to illustrate:

        <!--- A query --->
<cfset Q = QueryNew("ColA,ColB,ColC") />

        <!--- Create a porfile for the metadata --->
<cfset YODEL = StructNew() />
<cfset YODEL.MetadataName = "MyRecordset" />
<cfset YODEL.MetadataFields = "ColA,ColB,ColC" />
<cfset YODEL.MetadataTypes = "boolean,number,object" />

        <!--- Add the YODEL metadata to the end of the native metadata array
--->
<cfset CurMetaData = getmetadata(Q) />
<cfset ArrayAppend(CurMetaData, YODEL) />

        <!--- Doesn't show up in metadata... --->
<cfdump var="#getmetadata(Q)#" />
        <!--- ...But is accessible --->
<cfdump var="#CurMetaData[ArrayLen(CurMetaData)]#" />
        <!--- Doesn't seem to affect the query in practice --->
<cfdump var="#Q#" />
<cfdump var="#Q.recordcount#" />

So, the metadata for a query is, itself an array.  You can add to that
array, but any additions will not enumerate either in the normal metadata or
in the query itself - but you can access it directly.

Of course who knows if this will be supported in future versions or patches.

Unfortunately I've discovered no way to do anything remotely similar with
simple arrays or structs - making it an interesting exercise but not
incredibly useful for my purposes.

Still looking for an elegant solution....

Jim Davis




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219214
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to