Seems incomplete. You'd need to do similar in convert_type for the sql_query function to work.