Skip to content

Instantly share code, notes, and snippets.

@chuthan20
Last active March 10, 2016 03:37
Show Gist options
  • Save chuthan20/8655625 to your computer and use it in GitHub Desktop.
Save chuthan20/8655625 to your computer and use it in GitHub Desktop.
prints out the sqlite3 statement type and name.
+ (void) debugStatement:(sqlite3_stmt *)statement
{
for(int i=0; i<sqlite3_column_count(statement); i++)
{
sqlite3_column_value(statement, i);
const char *name = sqlite3_column_name(statement, i);
const char *type = sqlite3_column_decltype(statement, i);
NSLog(@"%d %s %s", i, name, type);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment