Add primary_key option to all queries