Exemplo n.º 1
1
        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());
        }
Exemplo n.º 2
0
        private static String QuerySql(CategoryQuery query)
        {
            var builder = new SQLBuilder();

            builder.AppendWhere();
            builder.Append(query.RestaurantId > 0, "and", "RestaurantId=@RestaurantId");

            return(builder.Sql());
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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());
        }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
        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());
        }