3

Is there any way to print the prepared statements, or at least implement the sqlite3_trace function when using fmdb? trying to access the statement from the FMResultset didn't work.

peko
  • 11,267
  • 4
  • 33
  • 48

1 Answers1

2

A sqlite3_trace function

void myTraceFunc(void *uData, const char *statement)
{
    NSLog(@"%s", statement);
}

can be implemented with

FMDatabase *db = ...;
[db open];
sqlite3_trace([db sqliteHandle], myTraceFunc, NULL);
Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382