PageRenderTime 570ms CodeModel.GetById 281ms app.highlight 1ms RepoModel.GetById 287ms app.codeStats 0ms

/src/Otis/Functions/MinFunction.cs

http://otis-lib.googlecode.com/
C# | 21 lines | 18 code | 2 blank | 1 comment | 0 complexity | 7cf78166e81dc976a8c1fa61f15d2b1d MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Text;
 4using Otis.CodeGen;
 5
 6namespace Otis.Functions
 7{
 8	public class MinFunction : MinMaxFunctionBase
 9	{
10		protected override string GetFormatForExecutedExpression(AggregateFunctionContext context)
11		{
12			// todo: test
13			return "if(CURR_ITEM < FN_OBJ) FN_OBJ = CURR_ITEM;";
14		}
15
16		protected override string GetFieldNameForInitialValue()
17		{
18			return "MaxValue";
19		}
20	}
21}