two_way_sql: returns generated sql only in scalar context.