public async Task <HttpResponseMessage> GenerateAdvanceClause(Filter filter)
 {
     return(await GetServiceResponseAsync <string>(async() =>
     {
         return await Task.FromResult(_filterLogic.GenerateAdvancedClause(filter.Clauses));
     }));
 }
Exemple #2
0
        public void GenerateSqlTests()
        {
            var filters = fixture.CreateMany <Clause>(0);
            var ret     = _filterLogic.GenerateAdvancedClause(filters);

            Assert.Equal(string.Empty, ret);
            filters = new List <Clause>
            {
                new Clause
                {
                    ColumnName  = "deviceId",
                    ClauseType  = ClauseType.EQ,
                    ClauseValue = "myDevice-1",
                }
            };
            Assert.Equal("deviceId = 'myDevice-1'", _filterLogic.GenerateAdvancedClause(filters));
        }