private static string WhereSql(Model.StatMetaData.Query query) { SQLBuilder builder = new SQLBuilder(); builder.AppendWhere(); builder.Append(query.StatTimeStart != null, "and", "stat_time>@StatTimeStart"); builder.Append(query.StatTimeEnd != null, "and", "stat_time<=@StatTimeEnd"); builder.Append(!string.IsNullOrWhiteSpace(query.ServiceName), "and", "servcie_name=@ServiceName"); builder.Append(!string.IsNullOrWhiteSpace(query.ApiPath), "and", "api_path=@ApiPath"); return(builder.Sql()); }
private static String QuerySql(CategoryQuery query) { var builder = new SQLBuilder(); builder.AppendWhere(); builder.Append(query.RestaurantId > 0, "and", "RestaurantId=@RestaurantId"); return(builder.Sql()); }
internal static string WhereSql(Query query) { SQLBuilder builder = new SQLBuilder(); builder.AppendWhere(); builder.Append(query.DirectoryId > 0, "and", "directory_id=@DirectoryId"); builder.Append(!string.IsNullOrWhiteSpace(query.Name), "and", "api_name like '%" + query.Name + "%'"); return builder.Sql(); }
internal static string WhereSql(Query query) { SQLBuilder builder = new SQLBuilder(); builder.AppendWhere(); builder.Append(query.DirectoryId > 0, "and", "directory_id=@DirectoryId"); builder.Append(!string.IsNullOrWhiteSpace(query.Name), "and", "api_name like '%" + query.Name + "%'"); return(builder.Sql()); }
private static string WhereSql(Model.ServiceStatMinute.Query query) { SQLBuilder builder = new SQLBuilder(); builder.AppendWhere(); builder.Append(query.StatTimeStart != null, "and", "stat_time>@StatTimeStart"); builder.Append(query.StatTimeEnd != null, "and", "stat_time<=@StatTimeEnd"); builder.Append(!string.IsNullOrWhiteSpace(query.ServiceName), "and", "service_name=@ServiceName"); return builder.Sql(); }
private static string WhereSql(Model.ServiceHostStatMinute.Query query) { SQLBuilder builder = new SQLBuilder(); builder.AppendWhere(); builder.Append(query.StatTimeStart != null, "and", "stat_time>@StatTimeStart"); builder.Append(query.StatTimeEnd != null, "and", "stat_time<=@StatTimeEnd"); builder.Append(!string.IsNullOrWhiteSpace(query.Host), "and", "host=@Host"); builder.Append(!string.IsNullOrWhiteSpace(query.ServiceName), "and", "service_name=@ServiceName"); return(builder.Sql()); }