(bind-func db_print_column
(lambda (stmt col)
(let ((type (sqlite3_column_type stmt col)))
(cond ((= type SQLITE_INTEGER)
(printout (sqlite3_column_int stmt col)))
((= type SQLITE_FLOAT)
(printout (sqlite3_column_double stmt col)))
((= type SQLITE_BLOB)
(printout "'BLOB'"))
((= type SQLITE3_TEXT)
(printout (Str (sqlite3_column_text stmt col))))
((= type SQLITE_NULL)
(printout "'NULL'"))
(else
(println "ERROR: bad sqlite type!"))))))