public String toSql()
    {
        return sql
                  + (whereClause != null ? " WHERE " + whereClause.toSql() : "")
                  + (orderClause != null ? " ORDER BY "  + orderClause.toSql() : "")
                  + (limit != null ? limit.toSql() : "");
    }