Handle non-integer primary keys, implement Cursor.fetchone