Skip to main content
This topic has been closed for replies.

2 replies

Known Participant
March 8, 2012

Is there an attribute setting for optional attributes? eg.I want to create a function myFunction(string var, numeric var2) but maybe var1 is required and var2 is optional? or do we just manually put the checks in place?

Owainnorth
Inspiring
March 8, 2012

What you've implied there are optional attributes. For required:

function myFunction(required string v1, numeric v2)

Second one is optional, first is required.

Known Participant
March 8, 2012

only just started dabbling with the query service and through my initial testing if I exclude one of the variables that is defined in the function it throws an error as it is looking for the second variable to be passed. That is without the required attribute.

function myFunction(string v1, numeric v2)

seems to expect both values being passed, unless I'm missing something.

Known Participant
March 1, 2012

what is the return type/class of execute() method and where is the documentation for this class

Community Expert
March 1, 2012

Calling the execute method of a query script object returns a query. It's really analogous in behavior to a CFQUERY tag. I'm not sure where exactly these script objects are documented, but I suspect it's somewhere within the regular documentation set.

Dave Watts, CTO, Fig Leaf Software

Dave Watts, Eidolon LLC