Hi,

I have a gateway CFC that returns queries for medications. Medications are
complex things that have many properties and require many tables to store
all the info. As well, there are hundreds of different ways to query the
meds.

My question is how do people break up their methods in these cases? 

In one extreme you can have 1 method that accepts many arguments, does some
conditional processing and returns a query based on your arguments. In the
other extreme you can have hundreds of methods that take no arguments and
return a specific query for your specific situation. The advantage of the
former case is that it's easy to maintain and make updates since there is
only one query. But because of all the conditional processing, every query
will run slower. In the latter case, your queries run very fast and serve
one simple, logical purpose, but you have hundreds to write and maintain
with a lot of code duplication. Like if I needed to change the FROM clause,
I'd have to do it for every single one.

Does anyone have a good rule of thumb of how to break up their queries?

Cheers,
Baz




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228999
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