sqlite3_changes implementation