turn debugging on

4 views
Skip to first unread message

Sana

unread,
Sep 2, 2008, 7:08:50 PM9/2/08
to DataFaucet ORM
Hi Isaac

What is the parameter to turn on debugging info for datafaucet. At the
moment I cannot see the sql statement was to run to fetch recordset.

I did a hack to bootstrap.cfc to <cfset variables.trace = true />.
But this is not good way to modify code-base and open.cfm does not
have any parameter to turn on trace/debug info.

Thanks

Isaac Dealey

unread,
Sep 2, 2008, 7:46:06 PM9/2/08
to dataf...@googlegroups.com

There's a bit of info about debugging in the SQL library page of the
documentation:

http://www.datafaucet.com/sqllib.cfm

I think I'll move that into its own page so it will show up in the
navigation menu on the left so people won't have to hunt for it. :)

There are two methods of debugging. If you want to debug an individual
query, you can set debug on the query via
statement.setValue("debug",true) - or if you want to see the sql for a
collection of queries at one time, you can enable and then disable debugging
across all executed queries via the bootstrap's tron() and troff()
methods.

df = request.datafaucet;
df.tron();

ds = df.getDatasource();

ds.select_from_tTable1();
ds.select_from_tTable2();

df.troff();

This was added primarily to make it easier to optimize queries for a
given page or "event" in your application by identifying good places to
combine them and/or substitute stored procedures.

--
[ ike ] founder - DataFaucet ORM

phone: 781.769.0723

http://www.datafaucet.com


Reply all
Reply to author
Forward
0 new messages