public static string GetTxtSql(SqlConfEntity conf) { if (!conf.Check()) { return(string.Empty); } var sqlNode = GetSqlNode(conf); if (sqlNode == null) { return(string.Empty); } return(sqlNode.Value.Replace("\r\n", " ").Replace("\n", " ").Replace("\t", " ").Trim()); }
public static PageQuerySqlEntity GetPageQuerySql(SqlConfEntity conf) { PageQuerySqlEntity entity = null; if (!conf.Check()) { return(entity); } var sqlNode = GetSqlNode(conf); if (sqlNode == null) { return(entity); } entity = new PageQuerySqlEntity { sp_name = sqlNode.Attribute("sp_name").Value, fields = sqlNode.Attribute("fields").Value, tables = sqlNode.Attribute("tables").Value, where = new StringBuilder(sqlNode.Attribute("where").Value), order = new StringBuilder(sqlNode.Attribute("order").Value), }; return(entity); }