Show only first N characters of database query output in debugger

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Feb 18, 2010, 9:54:30 AM2/18/10
to In-Portal Development
I think, that we should show only first N characters of database query output in debugger. This actual for queries made by kDBConnection::GetOne method only. For example whole set of cached configs is placed in debugger each time and makes each debugger report large in size.

I've already using such approach for displaying data, that is retrieved from memcached in 5.1.0.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Alexander Obuhovich

unread,
Feb 18, 2010, 10:05:50 AM2/18/10
to In-Portal Development
We should add

if (strlen($first_cell) > 200) {
    $first_cell = substr($first_cell, 0, 50) . ' ...';
}


after

$first_cell = count($ret) == 1 && count(current($ret)) == 1 ? current(current($ret)) : null;

in kDBConnection::debugQuery method

Alexander Obuhovich

unread,
Mar 14, 2010, 3:31:54 PM3/14/10
to In-Portal Development
long_sql_output_cut.patch
Reply all
Reply to author
Forward
0 new messages