Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

greendao: way to debug queries?

Is there any way to make greendao spit queries that're being carried out into Logcat? I just want to reassure everything's working fine and it would be a good feature to have while getting accustomed to the system.

like image 448
midnight Avatar asked Jan 20 '13 08:01

midnight


Video Answer


1 Answers

The class QueryBuilder has a static flag for this:

/** Set to true to debug the SQL. */
public static boolean LOG_SQL;

So just set *QueryBuilder.LOG_SQL = true*, and you should get what you want.

like image 134
Markus Junginger Avatar answered Oct 16 '22 10:10

Markus Junginger