Parameters and example FuncOR

FuncOR the same function as the logical “OR” SQL Builder function limitations SQLWhereLanguageDef.

Parameters GetFunction

GetFunction accepts the first argument type of a function funcAND, and then accepts N (>= 2) functions that you want to combine the logical “OR”. Let’s consider an example. Required to deduct all Кредиты issued in an amount exceeding 100,000 rubles or 10,000 rubles. The SQL statement would look as follows:

SELECT * FROM Кредит 
WHERE СуммаКредита < 10000 OR СуммаКредита > 100000

Where {ID} primary key desired Клиента.

SQLWhereLanguageDef:

SQLWhereLanguageDef langdef = SQLWhereLanguageDef.LanguageDef;
Function lf = langdef.GetFunction(langdef.funcOR,
			langdef.GetFunction(
				langdef.funcL, 
				new VariableDef(langdef.NumericType, Information.ExtractPropertyPath<Кредит>(x => x.СуммаКредита)), 
				10000),
			langdef.GetFunction(
				langdef.funcG, 
				new VariableDef(langdef.NumericType, Information.ExtractPropertyPath<Кредит>(x => x.СуммаКредита)), 
				100000));